Class BuildingBlockType (Word VBA)

The class BuildingBlockType represents a type of building block. Each BuildingBlockType object is a member of the BuildingBlockTypes collection.

Set

To use a BuildingBlockType class variable it first needs to be instantiated, for example

Dim bbt as BuildingBlockType
Set bbt = CustomizationContext.BuildingBlockTypes(Index:=1)

The following procedures can be used to set variables of type BuildingBlockType: BuildingBlock.Type, BuildingBlockTypes.Item, Category.Type and Template.BuildingBlockTypes

For Each

Here is an example of processing the BuildingBlockType items in a collection.

Dim bbt As BuildingBlockType
For Each bbt In CustomizationContext.BuildingBlockTypes
	
Next bbt

Categories

Returns a Categories collection that represents the categories for a building block type.

Dim ctgsCategories As Categories
Set ctgsCategories = CustomizationContext.BuildingBlockTypes(1).Categories

Index

Returns a Long that represents the position of an item in a collection.

Dim lngIndex As Long
lngIndex = CustomizationContext.BuildingBlockTypes(1).Index

Name

Returns a String that represents the localized name of a building block type.

Dim strName As String
strName = CustomizationContext.BuildingBlockTypes(1).Name

Parent

Returns an object that represents the parent object of the specified BuildingBlockType object.

Dim objParent As Object
Set objParent = CustomizationContext.BuildingBlockTypes(1).Parent

BuildingBlockTypes.Count

Returns the number of items in the BuildingBlockTypes collection.

Dim lngCount As Long
lngCount = CustomizationContext.BuildingBlockTypes.Count

BuildingBlockTypes.Item

Returns a BuildingBlockType object that represents the specified item in the collection.

Syntax : expression.Item (Index)

Index: Specifies the building block type of the item in the collection.

Dim bbt As BuildingBlockType
Set bbt = CustomizationContext.BuildingBlockTypes(Index:=1)

BuildingBlockTypes.Parent

Returns an object that represents the parent object of the specified BuildingBlockTypes object.

Dim objParent As Object
Set objParent = CustomizationContext.BuildingBlockTypes.Parent