共用方式為


Page.PageType 屬性 (Publisher)

會傳回代表頁面類型的 PbPageType 常 數。 唯讀。

語法

運算式PageType

表達 代表 Page 物件的變數。

傳回值

PbPageType

註解

PageType屬性值可以是 Microsoft Publisher 類型程式庫中所宣告的PbPageType常數之一。

範例

本範例會在使用中出版物的每一頁的交替角落中,新增一個圖案。

Sub GetPageType() 
 Dim pgCount As Page 
 For Each pgCount In ActiveDocument.Pages 
 If pgCount.PageType = pbPageLeftPage Then 
 pgCount.Shapes.AddShape Type:=msoShapeOval, _ 
 Left:=50, Top:=50, Width:=50, Height:=50 
 ElseIf pgCount.PageType = pbPageRightPage Then 
 pgCount.Shapes.AddShape Type:=msoShapeOval, _ 
 Left:=512, Top:=50, Width:=50, Height:=50 
 End If 
 Next 
End Sub

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應