BuildingBlockEntries.Add Method
Creates a new building block entry in a template and returns a BuildingBlock object that represents the new building block entry.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function Add ( _
Name As String, _
Type As WdBuildingBlockTypes, _
Category As String, _
Range As Range, _
ByRef Description As Object, _
InsertOptions As WdDocPartInsertOptions _
) As BuildingBlock
'Usage
Dim instance As BuildingBlockEntries
Dim Name As String
Dim Type As WdBuildingBlockTypes
Dim Category As String
Dim Range As Range
Dim Description As Object
Dim InsertOptions As WdDocPartInsertOptions
Dim returnValue As BuildingBlock
returnValue = instance.Add(Name, Type, _
Category, Range, Description, InsertOptions)
BuildingBlock Add(
string Name,
WdBuildingBlockTypes Type,
string Category,
Range Range,
ref Object Description,
WdDocPartInsertOptions InsertOptions
)
Parameters
- Name
Type: System.String
Specifies the name of the building block entry. Corresponds to the Name property of the BuildingBlock object.
- Type
Type: Microsoft.Office.Interop.Word.WdBuildingBlockTypes
Specifies the type of building block to create. Corresponds to the Type property of the BuildingBlock object.
- Category
Type: System.String
Specifies the category of the new building block entry. Corresponds to the Category property of the BuildingBlock object.
- Range
Type: Microsoft.Office.Interop.Word.Range
Specifies the value of the buildling block entry. Corresponds to the Value property of the BuildingBlock object.
- Description
Type: System.Object%
Specifies the description of the buildling block entry. Corresponds to the Description property of the BuildingBlock object.
- InsertOptions
Type: Microsoft.Office.Interop.Word.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.
Return Value
Type: Microsoft.Office.Interop.Word.BuildingBlock
BuildingBlock