ShapeNode.SegmentType property (Publisher)

Returns an MsoSegmentType constant that indicates whether the segment associated with the specified node is straight or curved. Read-only.

Syntax

expression.SegmentType

expression A variable that represents a ShapeNode object.

Return value

MsoSegmentType

Remarks

The SegmentType property value can be one of the MsoSegmentType constants declared in the Microsoft Publisher type library.

If the specified node is a control point for a curved segment, this property returns msoSegmentCurve.

Use the SetSegmentType method to set the value of this property.

Example

This example changes all straight segments to curved segments in the first shape on the first page of the active publication. For this example to work, the specified shape must be a freeform drawing.

Sub ChangeSegmentTypes() 
 Dim intNode As Integer 
 With ActiveDocument.Pages(1).Shapes(1).Nodes 
 intNode = 1 
 Do While intNode <= .Count 
 If .Item(intNode).SegmentType = msoSegmentLine Then 
 .SetSegmentType Index:=intNode, _ 
 SegmentType:=msoSegmentCurve 
 End If 
 intNode = intNode + 1 
 Loop 
 End With 
End Sub

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.