get_building_block method

get_building_block(gallery, category, name)

Finds a building block using the specified gallery, category and name.

def get_building_block(self, gallery: aspose.words.buildingblocks.BuildingBlockGallery, category: str, name: str):
    ...
ParameterTypeDescription
galleryBuildingBlockGalleryThe gallery criteria.
categorystrThe category criteria. Can be None, in which case it will not be used for comparison.
namestrThe building block name criteria.

Remarks

This is a convenience method that iterates over all building blocks in this collection and returns the first building block that matches the specified gallery, category and name.

Microsoft Word organizes building blocks into galleries. The galleries are predefined using the BuildingBlockGallery enum. Within each gallery, building blocks can be organized into one or more categories. The category name is a string. Each building block has a name. A building block name is not guaranteed to be unique.

Returns

The matching building block or None if a match was not found.

See Also