This documentation is archived and is not being maintained.

InlineShapes.AddPicture Method

Office 2007
Adds a picture to a document. Returns an InlineShape object that represents the picture.

Syntax

expression.AddPicture(FileName, LinkToFile, SaveWithDocument, Range)

expression   Required. A variable that represents an InlineShapes collection.

Parameters

NameRequired/OptionalData TypeDescription
FileNameRequiredStringThe path and file name of the picture.
LinkToFileOptionalVariantTrue 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.
SaveWithDocumentOptionalVariantTrue to save the linked picture with the document. The default value is False.
RangeOptionalVariantThe 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.



Show: