Shapes.AddLine Method

Adds a line to a document. Returns a Shape object that represents the line and adds it to the AddCallout collection.

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

Syntax

'Declaration
Function AddLine ( _
    BeginX As Single, _
    BeginY As Single, _
    EndX As Single, _
    EndY As Single, _
    ByRef Anchor As Object _
) As Shape
'Usage
Dim instance As Shapes
Dim BeginX As Single
Dim BeginY As Single
Dim EndX As Single
Dim EndY As Single
Dim Anchor As Object
Dim returnValue As Shape

returnValue = instance.AddLine(BeginX, _
    BeginY, EndX, EndY, Anchor)
Shape AddLine(
    float BeginX,
    float BeginY,
    float EndX,
    float EndY,
    ref Object Anchor
)

Parameters

  • BeginX
    Type: System.Single
    Required Single. The horizontal position, measured in points, of the line's starting point, relative to the anchor.
  • BeginY
    Type: System.Single
    Required Single. The vertical position, measured in points, of the line's starting point, relative to the anchor.
  • EndX
    Type: System.Single
    Required Single. The horizontal position, measured in points, of the line's end point, relative to the anchor.
  • EndY
    Type: System.Single
    Required Single. The vertical position, measured in points, of the line's end point, relative to the anchor.
  • Anchor
    Type: System.Object%
    Optional Object. A Range object that represents the text to which the label is bound. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this argument is omitted, the anchoring range is selected automatically and the label is positioned relative to the top and left edges of the page.

Return Value

Type: Microsoft.Office.Interop.Word.Shape

Remarks

To create an arrow, use the Line property to format a line.

See Also

Reference

Shapes Interface

Shapes Members

Microsoft.Office.Interop.Word Namespace