Modifica

Condividi tramite


Shape.CatalogMergeItems property (Publisher)

Returns a CatalogMergeShapes collection that represents the shapes included in the catalog merge area. Read-only.

Syntax

expression.CatalogMergeItems

expression A variable that represents a Shape object.

Return value

CatalogMergeShapes

Remarks

The catalog merge area can contain picture and text data fields that you have inserted, in addition to other design elements that you choose.

Example

The following example tests whether any page in the specified publication contains a catalog merge area, and if it does, it returns a list of the shapes that it contains.

Sub ListCatalogMergeAreaContents() 
 
 Dim pgPage As Page 
 Dim mmLoop As Shape 
 Dim intCount As Integer 
 
 For Each pgPage In ThisDocument.Pages 
 For Each mmLoop In pgPage.Shapes 
 
 If mmLoop.Type = pbCatalogMergeArea Then 
 
 With mmLoop.CatalogMergeItems 
 For intCount = 1 To .Count 
 Debug.Print "Shape ID: " & _ 
 mmLoop.CatalogMergeItems.Item(intCount).ID 
 Debug.Print "Shape Name: " & _ 
 mmLoop.CatalogMergeItems.Item(intCount).Name 
 Next 
 End With 
 
 End If 
 
 Next mmLoop 
 Next pgPage 
 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.