Share via


TextRange.InsertAfter Method

Publisher Developer Reference

Returns a TextRange object that represents text appended to the end of a text range.

Syntax

expression.InsertAfter(NewText)

expression   A variable that represents a TextRange object.

Parameters

Name Required/Optional Data Type Description
NewText Required String The text to be inserted.

Return Value
TextRange

Example

This example adds the Microsoft Office Publisher build number to the end of the first shape on the first page of the active publication. This example assumes the specified shape is a text frame and not another type of shape.

Visual Basic for Applications
  Sub AppendText()
    With ActiveDocument.Pages(1).Shapes(1)
        .TextFrame.TextRange.InsertAfter _
            NewText:="Microsoft Publisher Build : " & Build
    End With
End Sub

See Also