SetSegmentType Method [Publisher 2003 VBA Language Reference]
Sets the segment type of the segment that follows the specified node. If the node is a control point for a curved segment, this method sets the segment type for that curve; this may affect the total number of nodes by inserting or deleting adjacent nodes.
expression.SetSegmentType(Index, SegmentType)
expression Required. An expression that returns one of the objects in the Applies To list.
Index Required Long. The node whose segment type is to be set. Must be a number from 1 to the number of nodes in the specified shape; otherwise, an error occurs.
MsoSegmentType
MsoSegmentType can be one of these MsoSegmentType constants. |
msoSegmentCurve |
msoSegmentLine |
Example
This example changes all straight segments to curved segments in the third shape in the active publication. The shape must be a freeform drawing.
Dim intCount As Integer
With ActiveDocument.Pages(1).Shapes(3).Nodes
intCount = 1
Do While intCount <= .Count
If .Item(intCount).SegmentType = msoSegmentLine Then
.SetSegmentType _
Index:=intCount, SegmentType:=msoSegmentCurve
End If
intCount = intCount + 1
Loop
End With
Applies to | ShapeNodes Collection