Share via


ShapeNodes.SetSegmentType Method

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

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Sub SetSegmentType ( _
    Index As Integer, _
    SegmentType As MsoSegmentType _
)
'Usage
Dim instance As ShapeNodes
Dim Index As Integer
Dim SegmentType As MsoSegmentType

instance.SetSegmentType(Index, SegmentType)
void SetSegmentType(
    int Index,
    MsoSegmentType SegmentType
)

Parameters

  • Index
    Type: System.Int32
    The node whose segment type is to be set.

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

Examples

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

            .SetSegmentTypen, msoSegmentCurve

        End If

        n = n + 1

    Wend

End With

See Also

Reference

ShapeNodes Interface

ShapeNodes Members

Microsoft.Office.Interop.PowerPoint Namespace