Category Object
Word Developer Reference |
Represents an individual category of a building block type.
Version Information
Version Added: Word 2007
Remarks
Microsoft Office Word uses types and categories to organize building blocks. Each building block type is represented by a WdBuildingBlockTypes constant. Each category is a unique string that a user defines. Word comes with two categories already defined: "General" and "Custom"; you can create additional categories as you need.
Use the Type property to access the building block type associated with a specific category. Use the BuildingBlocks property to access the collection of building blocks for a category. The following example prints the type and category names of all the building blocks in the first template to the Immediate Window. (This example assumes that the Immediate Window is visible.)
Visual Basic for Applications |
---|
|
Use the Item method of the Categories collection to access an exising category; to create a new category, use the Add method of the BuildingBlockEntries collection. Set the value of the Category parameter.
For more information about building blocks, see Working with Building Blocks.
See Also
- Word Object Model Reference
- Category 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