ShapeNodes.SetSegmentType Method (Word)

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


expression. SetSegmentType( _Index_ , _SegmentType_ )

expression Required. A variable that represents a 'ShapeNodes' collection.


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.


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.


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 
End With

See also

ShapeNodes Collection Object