BuildingBlocks Collection
Word Developer Reference |
Represents a collection of BuildingBlock objects for a specific building block type and category in a template.
Version Information
Version Added: Word 2007
Remarks
Use the Add method to create a new building block and add it to a template. The following example adds the selected text to the watermarks building block gallery of the first template in the Templates collection.
Visual Basic for Applications |
---|
|
The collection returned with the BuildingBlocks collection is a filtered collection based on the type and category. Depending on how you access the collection, the collection returned changes. For example, if you access a collection of building blocks with a type of wdTypeAutoText with a category of "General", the returned collection may be different from the collection returned if you access a collection of building blocks with a type of wdTypeAutoText with a category of "Custom". It is also different from the collection returned if you access the collection of building blocks with a type of wdTypeCustomAutoText with a category of "General".
For more information about building blocks, see Working with Building Blocks.
See Also
- Word Object Model Reference
- BuildingBlocks Object Members
- How to: Bind Controls to a Specific Row in the Data Store When Inserting a Building Block
- How to: Create a Custom Building Block Gallery
- How to: Filter the Building Block List in a Content Control
- How to: Insert a Content Control into a Building Block
- How to: Set the Building Blocks That You Can Use for a Content Control
- Working with Building Blocks