ShapeRange.MoveIntoTextFlow method (Publisher)
Moves a given shape into the text flow defined by the TextRange object. The shape will always be inserted inline at the beginning of the text flow.
Syntax
expression.MoveIntoTextFlow (Range)
expression A variable that represents a ShapeRange object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Range | Required | TextRange | The range of text before which the given shape is inserted. |
Remarks
The MoveIntoTextFlow method fails if the shape to be moved is already inline or if it is not a valid inline shape type. Invalid inline shape types include:
- Inline shapes
- Grouped shapes
- HTML fragments
- Smart objects
- Chained text boxes
Example
The following example checks if the second shape on the second page of the publication is inline, and if it is not, inserts it inline at the beginning of the text flow of the given text range.
Dim theShape As Shape
Dim theRange As TextRange
Set theRange = ActiveDocument.Pages(2).Shapes(1).TextFrame.TextRange
Set theShape = ActiveDocument.Pages(2).Shapes(2)
If Not theShape.IsInline = msoTrue Then
theShape.MoveIntoTextFlow Range:=theRange
End If
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.