Shape.MoveToPage Method (Publisher)
Moves a shape to the specified page.
Version Information
Version Added: Publisher 2007
Syntax
expression .MoveToPage(Page, Left, Top)
expression A variable that represents a Shape object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Page |
Required |
Long |
Page to which the shape should be moved. |
Left |
Optional |
Variant |
Left position of the shape on the page. |
Top |
Optional |
Variant |
Top position of the shape on the page. |
Example
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.
Public Sub MoveToPage_Example()
Dim pubShape As Publisher.Shape
Set pubShape = ThisDocument.Pages(1).Shapes(1)
pubShape.MoveToPage 2
End Sub