BuildingBlock.Insert method (Word)
Inserts the value of a building block into a document and returns a Range object that represents the contents of the building block within the document.
Syntax
expression.Insert (Where, RichText)
expression An expression that returns a 'BuildingBlock' object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Where | Required | Range | The location of where to place the contents of the building block. |
RichText | Optional | Variant | True inserts the building block as rich, formatted text. False inserts the building block as plain text. |
Return value
Range
Example
The following example inserts the first building block from the first template into the first paragraph of the active document.
Dim objTemplate As Template
Dim objBB As BuildingBlock
Set objTemplate = Templates(1)
Set objBB = objTemplate.BuildingBlockEntries(1)
objBB.Insert ActiveDocument.Paragraphs(1).Range
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.