Düzenle

Aracılığıyla paylaş


BuildingBlockTypes object (Word)

Represents a collection of BuildingBlockType objects.

Remarks

Building block types are represented by WdBuildingBlockTypes constants. Use the Item method to access a specific type in the BuildingBlockTypes collection.

To loop through the different building block types, use a For loop with the Count property. The following example loops through the building block types and prints the name in the Immediate Window. (This example assumes that the Immediate Window is visible.)

Dim objTemplate As Template 
Dim intCount As Integer 
Dim objBBT As BuildingBlockType 
 
Set objTemplate = Templates(1) 
 
For intCount = 1 To objTemplate.BuildingBlockTypes.Count 
 Set objBBT = objTemplate.BuildingBlockTypes(intCount) 
 Debug.Print objBBT.Name 
Next

For more information about building blocks, see Working with Building Blocks.

Methods

Properties

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.