Export (0) Print
Expand All

InlineShapes.AddPicture Method 

Adds a picture to a document.

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 Range As Object
Dim returnValue As InlineShape
Dim inlineShapes1 As InlineShapes
returnValue = inlineShapes1.AddPicture(FileName, LinkToFile, SaveWithDocument, Range)

InlineShape AddPicture(
	[In] string FileName, 
	[In, Optional] ref object LinkToFile, 
	[In, Optional] ref object SaveWithDocument, 
	[In, Optional] ref object Range
);
public InlineShape AddPicture(
	/*in*/System.String FileName, 
	/*in*/System.Object LinkToFile, 
	/*in*/System.Object SaveWithDocument, 
	/*in*/System.Object Range
);
function AddPicture(
	 FileName : String, 
	 LinkToFile : Object, 
	 SaveWithDocument : Object, 
	 Range : Object
) : InlineShape;

Parameters

FileName

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

LinkToFile

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

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

Range

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

ADD
Show:
© 2015 Microsoft