Share via


InsertAfter Method

InsertAfter Method
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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

expression.InsertAfter(NewText)

expression   Required. An expression that returns one of the objects in the Applies To list.

NewText  Required String. The text to be inserted.

Example

This example adds Microsoft Publisher's 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.

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