Publisher) (Shape.InlineAlignment 屬性

傳回或設定 PbInlineAlignment 常數,指出內嵌圖案是否採用左對齊、右對齊或文字對齊方式。 讀取/寫入。

語法

運算式。InlineAlignment

expression 一個用於表示 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 支援與意見反應。