Shapes.AddLabel 方法 (Publisher)
將代表文字標籤的新 Shape 物件加入至指定 的 Shapes 集合。
語法
運算式。AddLabel (Orientation、 Left、 Top、 Width、 Height)
expression 代表 Shapes 物件的變數。
參數
名稱 | 必要/選用 | 資料類型 | 描述 |
---|---|---|---|
Orientation | 必要 | PbTextOrientation | 標籤的方向。 可以為其中一個 PbTextOrientation 常數。 |
Left | 必要 | Variant | 代表文字標籤之圖案的左邊緣位置。 |
Top | 必要 | Variant | 代表文字標籤之圖案的上緣位置。 |
Width | 必要 | Variant | 代表文字標籤之圖案的寬度。 |
Height | 必要 | Variant | 代表文字標籤之圖案的高度。 |
傳回值
圖形
註解
對於 Left、 Top、 Width和 Height 引數,數值會以 點為單位進行評估;字串可以是 Microsoft Publisher (支援的任何單位,例如「2.5 in」) 。
範例
下列範例會新增水平文字標籤到使用中出版物的首頁。
Dim shpLabel As Shape
Set shpLabel = ActiveDocument.Pages(1).Shapes.AddLabel _
(Orientation:=pbTextOrientationHorizontal, _
Left:=144, Top:=144, _
Width:=72, Height:=18)
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。