BuildingBlockEntries.Add 方法

定义

在模板中创建新的构建基块条目,并返回表示 BuildingBlock 新构建基块条目的 对象。

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

参数

Name
String

指定生成块条目的名称。 对应于 Name 对象的 属性 BuildingBlock

Type
WdBuildingBlockTypes

指定要创建的生成块的类型。 对应于 Type 对象的 属性 BuildingBlock

Category
String

指定新的生成块条目的类别。 对应于 Category 对象的 属性 BuildingBlock

Range
Range

指定生成块条目的值。 对应于 Value 对象的 属性 BuildingBlock

Description
Object

指定生成块条目的说明。 对应于 Description 对象的 属性 BuildingBlock

InsertOptions
WdDocPartInsertOptions

指定是将生成块条目作为页、段落插入还是将其内嵌。 如果省略,则默认值为 wdInsertContent。 对应于 InsertOptions 对象的 属性 BuildingBlock

返回

BuildingBlock

适用于