CanvasShapes.AddPicture Method
Word Developer Reference |
Adds a picture to a drawing canvas. Returns a Shape object that represents the picture and adds it to the CanvasShapes collection.
Syntax
expression.AddPicture(FileName, LinkToFile, SaveWithDocument, Left, Top, Width, Height)
expression Required. A variable that represents a CanvasShapes collection.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
FileName | Required | String | The path and file name of the picture. |
LinkToFile | Optional | Variant | True to link the picture to the file from which it was created. False to make the picture an independent copy of the file. The default value is False. |
SaveWithDocument | Optional | Variant | True to save the linked picture with the document. The default value is False. |
Left | Optional | Variant | The position, measured in points, of the left edge of the new picture relative to the drawing canvas. |
Top | Optional | Variant | The position, measured in points, of the top edge of the new picture relative to the drawing canvas. |
Width | Optional | Variant | The width of the picture, in points. |
Height | Optional | Variant | The height of the picture, in points. |
Example
This example adds a picture to a newly created drawing canvas in the active document.
Visual Basic for Applications |
---|
|
See Also