ShapeNodes.SetSegmentType method (PowerPoint)

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

Syntax

expression. SetSegmentType( _Index_, _SegmentType_ )

expression A variable that represents a ShapeNodes object.

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 specified by Index 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.

The SegmentType parameter value can be one of these MsoSegmentType constants.

msoSegmentCurve
msoSegmentLine

Example

This example changes all straight segments to curved segments in shape three on myDocument. Shape three must be a freeform drawing.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    n = 1

    While n <= .Count

        If .Item(n).SegmentType = msoSegmentLine Then

            .SetSegmentType n, msoSegmentCurve

        End If

        n = n + 1

    Wend

End With

See also

ShapeNodes 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.