Table of contents
TOC
Collapse the table of content
Expand the table of content

ShapeRange.InlineAlignment Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns or sets a PbInlineAlignment constant that indicates whether an inline shape has left, right, or in-text alignment. Read/write.

Syntax

expression. InlineAlignment

_expression_A variable that represents a ShapeRange object.

Remarks

The InlineAlignment property value can be one of the PbInlineAlignment constants declared in the Microsoft Publisher type library.

An automation error is returned if the shape is not already inline.

Example

The following example moves the second shape on the second page of the publication into the text flow by using the MoveIntoTextFlow method. The InlineAlignment property is then used to align the shape to the right.

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 
 theShape.InlineAlignment = pbInlineAlignmentRight 
End If
© 2018 Microsoft