MoveIntoTextFlow Method [Publisher 2003 VBA Language Reference]
Moves a given shape into the text flow defined by TextRange Object. The shape will always be inserted inline at the beginning of the text flow.
expression.MoveIntoTextFlow(Range)
expression Required. An expression that returns one of the objects in the Applies To list.
Range Required TextRange. The range of text before which the given shape is inserted.
Remarks
The MoveIntoTextFlow method will fail 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
Applies to | Shape Object | ShapeRange Collection