The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This documentation is archived and is not being maintained.
How to: Insert a Content Control into a Building Block
Word Developer Reference
Building blocks and content controls are extremely flexible. You can create building blocks that contain content controls, or you can create content controls that use building blocks to present rich content selections to the user. This topic shows how to insert a content control into a building block, which users can then insert into their documents.
The following code inserts a content control into the active document, and then adds the content control to the collection of building blocks in the template attached to the active document.
Dim objCC As ContentControl
Dim objBB As BuildingBlock
Dim objTemplate As Template
Dim objRange As Range
Set objTemplate = ActiveDocument.AttachedTemplate
Set objCC = ActiveDocument.Range.ContentControls _
Set objRange = ActiveDocument.Range
Set objBB = objTemplate.BuildingBlockEntries.Add("OGF Rating Scale", _
wdTypeCustom1, "Ratings", objRange)