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

ShapeNodes.SetPosition Method (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Sets the location of the node specified by Index. Note that, depending on the editing type of the node, this method may affect the position of adjacent nodes.

Syntax

expression. SetPosition( Index, X1, Y1 )

expression A variable that represents a ShapeNodes object.

Parameters

NameRequired/OptionalData TypeDescription
IndexRequiredLongThe node whose position is to be set.
Y1RequiredSingleThe x-position (in points) of the new node relative to the upper-left corner of the document.
Y1RequiredSingleThe y-position (in points) of the new node relative to the upper-left corner of the document.

Example

This example moves node two in shape three on myDocument to the right 200 points and down 300 points. Shape three must be a freeform drawing.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    pointsArray = .Item(2).Points

    currXvalue = pointsArray(1, 1)

    currYvalue = pointsArray(1, 2)

    .SetPosition 2, currXvalue + 200, currYvalue + 300

End With

See also

Concepts

ShapeNodes Object

© 2018 Microsoft