ShapeNodes.SetSegmentType method (Word)

Sets the segment type of the segment that follows the node specified by Index.

Syntax

expression. SetSegmentType( _Index_ , _SegmentType_ )

expression Required. A variable that represents a ShapeNodes collection.

Parameters

Name Required/Optional Data type Description
Index Required Long The node whose segment type is to be set.
SegmentType Required MsoSegmentType Specifies if the segment is straight or curved.

Remarks

If the node is a control point for a curved segment, this method sets the segment type for that curve. Note that this may affect the total number of nodes by inserting or deleting adjacent nodes.

Example

This example changes all straight segments to curved segments in the third shape on the active document. The third shape must be a freeform drawing.

Dim lngLoop As Long 
 
With ActiveDocument.Shapes(3).Nodes 
 lngLoop = 1 
 While lngLoop <= .Count 
 If .Item(lngLoop).SegmentType = msoSegmentLine Then 
 .SetSegmentType lngLoop, msoSegmentCurve 
 End If 
 lngLoop = lngLoop + 1 
 Wend 
End With

See also

ShapeNodes Collection Object

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.