Table of contents
TOC
Collapse the table of content
Expand the table of content

Shape.RemoveCatalogMergeArea Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Deletes the catalog merge area from the specified publication page. All shapes contained in the catalog merge area remain in place on the page, but are no longer connected to the catalog merge data source.

Syntax

expression. RemoveCatalogMergeArea

_expression_A variable that represents a Shape object.

Remarks

Removing a catalog merge area from a publication page does not disconnect the data source from the publication. Use the IsDataSourceConnected property of the Document object to determine if a data source is connected to a publication.

Use the AddCatalogMergeArea method of the Shapes collection to add a catalog merge area to a publication. A publication page can contain only one catalog merge area.

Example

The following example tests whether any page in the specified publication contains a catalog merge area. If any page does, all the shapes are removed from the catalog merge area and deleted, and the catalog merge area is then removed from the publication.

Sub DeleteCatalogMergeAreaAndAllShapesWithin() 
 Dim pgPage As Page 
 Dim mmLoop As Shape 
 Dim intCount As Integer 
 Dim strName As String 

 For Each pgPage In ThisDocument.Pages 
 For Each mmLoop In pgPage.Shapes 

 If mmLoop.Type = pbCatalogMergeArea Then 
 With mmLoop.CatalogMergeItems 
 For intCount = .Count To 1 Step -1 
 strName = mmLoop.CatalogMergeItems.Item(intCount).Name 
 .Item(intCount).RemoveFromCatalogMergeArea 
 pgPage.Shapes(strName).Delete 
 Next 
 End With 
 mmLoop.RemoveCatalogMergeArea 
 End If 

 Next mmLoop 
 Next pgPage 

End Sub
© 2018 Microsoft