Share via


Page.Duplicate Method

Publisher Developer Reference

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.

Visual Basic for Applications
  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

See Also