Publisher) (WebNavigationBarSets.Count 屬性

會傳回 Long,代表指定集合中項目的數目。

語法

運算式計數

表達 代表 WebNavigationBarSets 物件的 變數。

範例

在這個範例中,會顯示使用中文件的頁數。

Sub CountNumberOfPages() 
 MsgBox "Your publication contains " & _ 
 ActiveDocument.Pages.Count & " page(s)." 
End Sub

在這個範例中,會顯示使用中文件的圖案數目。

Sub CountNumberOfShapes() 
 Dim intShapes As Integer 
 Dim pg As Page 
 
 For Each pg In ActiveDocument.Pages 
 intShapes = intShapes + pg.Shapes.Count 
 Next 
 
 MsgBox "Your publication contains " & intShapes & " shape(s)." 
End Sub

支援和意見反應

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