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


Adds a picture to a document.

public Microsoft.Office.Interop.Word.InlineShape AddPicture (string FileName, ref object LinkToFile, ref object SaveWithDocument, ref object Range);
Public Function AddPicture (FileName As String, Optional ByRef LinkToFile As Object, Optional ByRef SaveWithDocument As Object, Optional ByRef Range As Object) As InlineShape


String String

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


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.


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


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.



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

Applies to