ContentControl.BuildingBlockType Property

Gets or sets the type of the building blocks that are displayed in a ContentControl that represents a building block gallery.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Syntax

'Declaration
Property BuildingBlockType As WdBuildingBlockTypes
WdBuildingBlockTypes BuildingBlockType { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.WdBuildingBlockTypes
The type of the building blocks that are displayed in the control.

Exceptions

Exception Condition
COMException

The property is set to a Microsoft.Office.Interop.Word.WdBuildingBlockTypes value that identifies a category of building blocks that cannot be displayed in a ContentControl.

Remarks

This property is intended to be used only if the Type property of the ContentControl has the value Microsoft.Office.Interop.Word.WdContentControlType.wdContentControlBuildingBlockGallery. Otherwise, this property does nothing.

All building blocks belong to a gallery and a category. Use the BuildingBlockType property to specify which gallery of building blocks to display in the ContentControl.

A ContentControl can display only certain galleries of building blocks. The BuildingBlockType property can be set only to the following Microsoft.Office.Interop.Word.WdBuildingBlockTypes values:

  • wdTypeAutoText

  • wdTypeCustom1

  • wdTypeCustom2

  • wdTypeCustom3

  • wdTypeCustom4

  • wdTypeCustom5

  • wdTypeCustomAutoText

  • wdTypeCustomEquations

  • wdTypeCustomQuickParts

  • wdTypeCustomTables

  • wdTypeEquations

  • wdTypeQuickParts

  • wdTypeTables

To specify the category of building blocks that are displayed by the ContentControl, use the BuildingBlockCategory property.

.NET Framework Security

See Also

Reference

ContentControl Interface

Microsoft.Office.Tools.Word Namespace