BuildingBlockType 对象 (Word)
代表构建基块的类型。 每个 BuildingBlockType 对象都是 BuildingBlockTypes 集合的成员。
备注
Microsoft Word 使用类型和类别来组织构建基块。 每个构建基块类型都由 WdBuildingBlockTypes 常量表示。 使用 Categories 属性访问特定构建基块类型的类别。 以下示例将第一个模板中所有构建基块的类型和类别名称打印到 “即时窗口”。 (此示例假定 即时窗口 可见。)
Dim objTemplate As Template
Dim objBBT As BuildingBlockType
Dim objCat As Category
Dim intCount As Integer
Dim intCountCat As Integer
Set objTemplate = Templates(1)
For intCount = 1 To objTemplate.BuildingBlockTypes.Count
Set objBBT = objTemplate.BuildingBlockTypes(intCount)
If objBBT.Categories.Count > 0 Then
Debug.Print objBBT.Name
For intCountCat = 1 To objBBT.Categories.Count
Set objCat = objBBT.Categories(intCountCat)
Debug.Print vbTab & objCat.Name
Next
End If
Next
有关构建基块的详细信息,请参阅处理构建基块。
属性
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。