Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 1.56 KB

Word.ShapeNodes.SetSegmentType.md

File metadata and controls

65 lines (40 loc) · 1.56 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ShapeNodes.SetSegmentType method (Word)
vbawd10.chm164495375
vbawd10.chm164495375
Word.ShapeNodes.SetSegmentType
8afa8b4b-73bf-e64b-b6fa-427e891a9e07
06/08/2017
medium

ShapeNodes.SetSegmentType method (Word)

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

Syntax

expression. SetSegmentType( _Index_ , _SegmentType_ )

expression Required. A variable that represents a ShapeNodes collection.

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

Example

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

See also

ShapeNodes Collection Object

[!includeSupport and feedback]