Share via


Shape.Vertices Property

Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only.

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

Syntax

'Declaration
ReadOnly Property Vertices As Object
    Get
'Usage
Dim instance As Shape
Dim value As Object

value = instance.Vertices
Object Vertices { get; }

Property Value

Type: System.Object
Variant

Remarks

You can use the array returned by this property as an argument to the AddCurve(Object) method or AddPolyline(Object) method.

The following table shows how the Vertices property associates the values in the array vertArray() with the coordinates of a triangle's vertices.

VertArray element

Contains

VertArray(1, 1)

The horizontal distance from the first vertex to the left side of the slide

VertArray(1, 2)

The vertical distance from the first vertex to the top of the slide

VertArray(2, 1)

The horizontal distance from the second vertex to the left side of the slide

VertArray(2, 2)

The vertical distance from the second vertex to the top of the slide

VertArray(3, 1)

The horizontal distance from the third vertex to the left side of the slide

VertArray(3, 2)

The vertical distance from the third vertex to the top of the slide

Examples

This example assigns the vertex coordinates for shape one on myDocument to the array variable vertArray() and displays the coordinates for the first vertex.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1)

    vertArray = .Verticesx1 = vertArray(1, 1)

    y1 = vertArray(1, 2)

    MsgBox "First vertex coordinates: " & x1 & ", " & y1

End With

This example creates a curve that has the same geometric description as shape one on myDocument. Shape one must contain 3+1 vertices for this example to succeed.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddCurve .Item(1).VerticesEnd With

See Also

Reference

Shape Interface

Shape Members

Microsoft.Office.Interop.PowerPoint Namespace