BuildingBlocks.Add Method
Word Developer Reference |
Creates a new building block and returns a BuildingBlock object.
Syntax
expression.Add(Name, Range, Description, InsertOptions)
expression An expression that returns a BuildingBlocks object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Name | Required | String | Specifies the name of the building block entry. Corresponds to the Name property of the BuildingBlock object. |
Range | Required | Range | Specifies the value of the buildling block entry. Corresponds to the Value property of the BuildingBlock object. |
Description | Optional | Variant | Specifies the description of the buildling block entry. Corresponds to the Description property of the BuildingBlock object. |
InsertOptions | Optional | WdDocPartInsertOptions | Specifies whether the building block entry is inserted as a page, a paragraph, or inline. If omitted, the default value is wdInsertContent. Corresponds to the InsertOptions property for the BuildingBlock object. |
Return Value
BuildingBlock
Example
The following example adds a new building block auto text entry to the first template in the collection of templates.
Visual Basic for Applications |
---|
|
See Also
- BuildingBlocks Collection
- 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