This documentation is archived and is not being maintained.

Shape.MoveToPage Method

Office 2007
Moves a shape to the specified page.

Version Information
 Version Added:  Publisher 2007


expression.MoveToPage(Page, Left, Top)

expression   A variable that represents a Shape object.


NameRequired/OptionalData TypeDescription
PageRequiredLongPage to which the shape should be moved.
LeftOptionalVariantLeft position of the shape on the page.
TopOptionalVariantTop position of the shape on the page.


The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the MoveToPage method to move the first shape in the Shapes collection on the first page of a publication to the same relative location on the second page of the publication.

This code assumes that the current publication contains at least two pages, and that there is at least one shape on the first page of the publication.

Visual Basic for Applications
Public Sub MoveToPage_Example()

    Dim pubShape As Publisher.Shape
   Set pubShape = ThisDocument.Pages(1).Shapes(1)
   pubShape.MoveToPage 2

End Sub

See Also