Shape.InlineAlignment 属性 (Publisher)

返回或设置一个 PbInlineAlignment 常量,该常量指示内联形状是具有左对齐方式、右对齐方式还是文本内对齐方式。 读/写。

语法

表达式InlineAlignment

表达 一个代表 Shape 对象的变量。

备注

InlineAlignment 属性值可以是 Microsoft Publisher 类型库中声明的 PbInlineAlignment 常量之一。

如果该形状尚未嵌入,则返回自动化错误。

示例

下面的示例将移动第二个形状出版物第二页上文本流到通过使用 MoveIntoTextFlow 方法。 然后, InlineAlignment 属性用于对齐形状向右。

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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。