Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Moves a shape to the specified page.
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
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.