Page.Duplicate method (Publisher)

Creates a duplicate of the specified Page object and then returns the new Page object.

Syntax

expression.Duplicate

expression A variable that represents a Page object.

Return value

Page

Example

The following example duplicates the first page in the publication and then sets properties for the duplicate. A shape is then added to the new page and properties are set for the shape.

Dim objPage As Page 
Set objPage = ActiveDocument.Pages(1).Duplicate 
With objPage 
 .Background.Fill.ForeColor.SchemeColor = pbSchemeColorAccent1 
 .Shapes.AddShape msoShapeRectangle, 150, 250, 310, 275 
 With .Shapes(1) 
 .Fill.ForeColor.SchemeColor = pbSchemeColorAccent3 
 End With 
End With 

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.