CanvasShapes.AddLine Method
Word Developer Reference |
Adds a line to a drawing canvas. Returns a Shape object that represents the line and adds it to the CanvasShapes collection.
Syntax
expression.AddLine(BeginX, BeginY, EndX, EndY)
expression Required. A variable that represents a CanvasShapes collection.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
BeginX | Required | Single | The horizontal position, measured in points, of the line's starting point, relative to the drawing canvas. |
BeginY | Required | Single | The vertical position, measured in points, of the line's starting point, relative to the drawing canvas. |
EndX | Required | Single | The horizontal position, measured in points, of the line's endpoint, relative to the drawing canvas. |
EndY | Required | Single | The vertical position, measured in points, of the line's endpoint, relative to the drawing canvas. |
Remarks
To create an arrow, use the Line property to format a line.
Example
This example adds a purple line with an arrow to a new drawing canvas.
Visual Basic for Applications |
---|
|
See Also