BuildingBlockEntries.Add(String, WdBuildingBlockTypes, String, Range, Object, WdDocPartInsertOptions) Method

Definition

Creates a new building block entry in a template and returns a BuildingBlock object that represents the new building block entry.

public Microsoft.Office.Interop.Word.BuildingBlock Add (string Name, Microsoft.Office.Interop.Word.WdBuildingBlockTypes Type, string Category, Microsoft.Office.Interop.Word.Range Range, ref object Description, Microsoft.Office.Interop.Word.WdDocPartInsertOptions InsertOptions = Microsoft.Office.Interop.Word.WdDocPartInsertOptions.wdInsertContent);
abstract member Add : string * Microsoft.Office.Interop.Word.WdBuildingBlockTypes * string * Microsoft.Office.Interop.Word.Range * obj * Microsoft.Office.Interop.Word.WdDocPartInsertOptions -> Microsoft.Office.Interop.Word.BuildingBlock
Public Function Add (Name As String, Type As WdBuildingBlockTypes, Category As String, Range As Range, Optional ByRef Description As Object, Optional InsertOptions As WdDocPartInsertOptions = Microsoft.Office.Interop.Word.WdDocPartInsertOptions.wdInsertContent) As BuildingBlock

Parameters

Name
String

Specifies the name of the building block entry. Corresponds to the Name property of the BuildingBlock object.

Type
WdBuildingBlockTypes

Specifies the type of building block to create. Corresponds to the Type property of the BuildingBlock object.

Category
String

Specifies the category of the new building block entry. Corresponds to the Category property of the BuildingBlock object.

Range
Range

Specifies the value of the buildling block entry. Corresponds to the Value property of the BuildingBlock object.

Description
Object

Specifies the description of the buildling block entry. Corresponds to the Description property of the BuildingBlock object.

InsertOptions
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.

Returns

BuildingBlock

BuildingBlock

Applies to