共用方式為


Shape.InlineAlignment 屬性 (出版商)

回傳或設定一個 PbInlineAlignment 常數,指示內嵌形狀是左對齊、右對齊還是文內對齊。 讀取/寫入。

語法

表情內線對齊

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 支援與意見反應