편집

다음을 통해 공유


BuildingBlocks Interface

Definition

Represents a collection of BuildingBlock objects for a specific building block type and category in a template.

public interface class BuildingBlocks
[System.Runtime.InteropServices.Guid("C6D50987-25D7-408A-BFF2-90BF86A24E93")]
public interface BuildingBlocks
type BuildingBlocks = interface
Public Interface BuildingBlocks
Attributes

Remarks

Use the Add(String, Range, Object, WdDocPartInsertOptions) method to create a new building block and add it to a template.

The collection returned with the BuildingBlocks collection is a filtered collection based on the type and category. Depending on how you access the collection, the collection returned changes. For example, if you access a collection of building blocks with a type of wdTypeAutoText with a category of "General", the returned collection may be different from the collection returned if you access a collection of building blocks with a type of wdTypeAutoText with a category of "Custom". It is also different from the collection returned if you access the collection of building blocks with a type of wdTypeCustomAutoText with a category of "General".

For more information about building blocks, see Working with Building Blocks

Properties

Application

Returns an _Application object that represents the Microsoft Word application.

Count

Returns the number of items in the BuildingBlocks collection. Read-only.

Creator

Returns a 32-bit integer that indicates the application in which the add-in was created. Read-only.

Parent

Returns the parent object of the specified BuildingBlocks object.

Methods

Add(String, Range, Object, WdDocPartInsertOptions)

Creates a new building block and returns a BuildingBlock object.

Item(Object)

Returns the specified item in the collection.

Applies to