Export (0) Print
Expand All

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)

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.

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

Community Additions

ADD
Show:
© 2015 Microsoft