Shapes.AddCanvas Method
Word Developer Reference |
Adds a drawing canvas to a document. Returns a Shape object that represents the drawing canvas and adds it to the Shapes collection.
Syntax
expression.AddCanvas(Left, Top, Width, Height, Anchor)
expression Required. A variable that represents a Shapes collection.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Left | Required | Single | The position, in points, of the left edge of the drawing canvas, relative to the anchor. |
Top | Required | Single | The position, in points, of the top edge of the drawing canvas, relative to the anchor. |
Width | Required | Single | The width, in points, of the drawing canvas. |
Height | Required | Single | The height, in points, of the drawing canvas. |
Anchor | Optional | Variant | A Range object that represents the text to which the canvas 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 canvas is positioned relative to the top and left edges of the page. |
Return Value
Shape
Example
The following example adds a drawing canvas to a new document and formats the drawing canvas so it is inline with the text; then adds two shapes to the canvas, and formats the fill and line properties.
Visual Basic for Applications |
---|
|
See Also