CanvasShapes.AddPicture MethodÂ
Adds a picture to a drawing canvas.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)
Usage
Dim FileName As String
Dim LinkToFile As Object
Dim SaveWithDocument As Object
Dim Left As Object
Dim Top As Object
Dim Width As Object
Dim Height As Object
Dim returnValue As Shape
Dim canvasShapes1 As CanvasShapes
returnValue = canvasShapes1.AddPicture(FileName, LinkToFile, SaveWithDocument, Left, Top, Width, Height)
Syntax
Function AddPicture( _
<InAttribute()> ByVal FileName As String, _
<InAttribute()> Optional ByRef LinkToFile As Object, _
<InAttribute()> Optional ByRef SaveWithDocument As Object, _
<InAttribute()> Optional ByRef Left As Object, _
<InAttribute()> Optional ByRef Top As Object, _
<InAttribute()> Optional ByRef Width As Object, _
<InAttribute()> Optional ByRef Height As Object _
) As Shape
Shape AddPicture(
[In] string FileName,
[In, Optional] ref object LinkToFile,
[In, Optional] ref object SaveWithDocument,
[In, Optional] ref object Left,
[In, Optional] ref object Top,
[In, Optional] ref object Width,
[In, Optional] ref object Height
);
public: Shape^ AddPicture(
String^ FileName,
&Object^ LinkToFile,
&Object^ SaveWithDocument,
&Object^ Left,
&Object^ Top,
&Object^ Width,
&Object^ Height
);
public Shape AddPicture(
/*in*/System.String FileName,
/*in*/System.Object LinkToFile,
/*in*/System.Object SaveWithDocument,
/*in*/System.Object Left,
/*in*/System.Object Top,
/*in*/System.Object Width,
/*in*/System.Object Height
);
function AddPicture(
FileName : String,
LinkToFile : Object,
SaveWithDocument : Object,
Left : Object,
Top : Object,
Width : Object,
Height : Object
) : Shape;
Parameters
- FileName
The path and file name of the picture.
- LinkToFile
A value that indicates whether to link the picture to the file from which it was created. False indicates the picture should be made an independent copy of the file. The default value is False.
- SaveWithDocument
A value that indicates whether to save the linked picture with the document. The default value is False.
- Left
The position, measured in points, of the left edge of the new picture relative to the drawing canvas.
- Top
The position, measured in points, of the top edge of the new picture relative to the drawing canvas.
- Width
The width of the picture, in points.
- Height
The height of the picture, in points.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000
Target Platforms
See Also
Reference
CanvasShapes Interface
Microsoft.Office.Interop.Word Namespace