Table of contents
TOC
折叠目录
展开目录

WizardValues.Count 属性 (发布服务器)WizardValues.Count Property (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回一个Long ,该值表示指定集合中项的数目。Returns a Long that represents the number of items in the specified collection.

语法Syntax

表达式计数expression. Count

_expression_A 表示WizardValues对象的变量。_expression_A variable that represents a WizardValues object.

示例Example

以下示例显示当前文档中页面的数量。This example displays the number of pages in the active document.

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

以下示例显示当前文档中形状的数量。This example displays the number of shapes in the active document.

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
© 2018 Microsoft