Table of contents
TOC
Collapse the table of content
Expand the table of content

Shape.MoveToPage Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Moves a shape to the specified page.

Syntax

expression. MoveToPage( Page, Left, Top)

_expression_A variable that represents a Shape object.

Parameters

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.

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
© 2018 Microsoft