Shapes.AddPicture (Excel)

Creates a picture from an existing file. Returns a Shape object that represents the new picture.

AddPicture (Filename, LinkToFile, SaveWithDocument, Left, Top, Width, Height)


Dim strFilename As String: strFilename = 
Dim shpAddPicture As Shape
Set shpAddPicture = ActiveChart.Shapes.AddPicture(Filename:=strFilename, LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, Left:=, Top:=, Width:=, Height:=)

Arguments

The following arguments are required:

Filename (String) - The file from which the picture is to be created.

LinkToFile (Office.MsoTriState) - The file to link to. Use msoFalse to make the picture an independent copy of the file. Use msoTrue to link the picture to the file from which it was created.

SaveWithDocument (Office.MsoTriState) - To save the picture with the document. Use msoFalse to store only the link information in the document. Use msoTrue to save the linked picture with the document into which it's inserted. This argument must be msoTrue if LinkToFile is msoFalse.

Left (Single) - The position (in points) of the upper-left corner of the picture relative to the upper-left corner of the document.

Top (Single) - The position (in points) of the upper-left corner of the picture relative to the top of the document.

Width (Single) - The width of the picture, in points (enter -1 to retain the width of the existing file).

Height (Single) - The height of the picture, in points (enter -1 to retain the height of the existing file).