ShapeNodes.SetPosition method (Word)
Sets the location of the node specified by Index.
Syntax
expression. SetPosition
( _Index_
, _X1_
, _Y1_
)
expression Required. A variable that represents a ShapeNodes collection.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index | Required | Long | The node whose position is to be set. |
X1 | Required | Single | The position (in points) of the new node relative to the upper-left corner of the document. |
Remarks
Depending on the editing type of the node, this method may affect the position of adjacent nodes.
Example
This example moves node two in the third shape on the active document to the right 200 points and down 300 points. The third shape must be a freeform drawing.
With ActiveDocument.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
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for