InlineShapes.AddPicture(String, Object, Object, Object) Method

Definition

Adds a picture to a document.

public Microsoft.Office.Interop.Word.InlineShape AddPicture (string FileName, ref object LinkToFile, ref object SaveWithDocument, ref object Range);
abstract member AddPicture : string * obj * obj * obj -> Microsoft.Office.Interop.Word.InlineShape
Public Function AddPicture (FileName As String, Optional ByRef LinkToFile As Object, Optional ByRef SaveWithDocument As Object, Optional ByRef Range As Object) As InlineShape

Parameters

FileName
String

Required String. The path and file name of the picture.

LinkToFile
Object

Optional Object. 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
Object

Optional Object. True to save the linked picture with the document. The default value is False.

Range
Object

Optional Object. The location where the picture will be placed in the text. If the range isn't collapsed, the picture replaces the range; otherwise, the picture is inserted. If this argument is omitted, the picture is placed automatically.

Returns

Remarks

This method returns a Shape object that represents the picture and adds it to the InlineShapes collection.

Applies to