Modifica

Condividi tramite


Shapes.AddPicture2 Method

Definition

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

public:
 Microsoft::Office::Interop::Excel::Shape ^ AddPicture2(System::String ^ Filename, Microsoft::Office::Core::MsoTriState LinkToFile, Microsoft::Office::Core::MsoTriState SaveWithDocument, float Left, float Top, float Width, float Height, Microsoft::Office::Core::MsoPictureCompress Compress);
public Microsoft.Office.Interop.Excel.Shape AddPicture2 (string Filename, Microsoft.Office.Core.MsoTriState LinkToFile, Microsoft.Office.Core.MsoTriState SaveWithDocument, float Left, float Top, float Width, float Height, Microsoft.Office.Core.MsoPictureCompress Compress);
Public Function AddPicture2 (Filename As String, LinkToFile As MsoTriState, SaveWithDocument As MsoTriState, Left As Single, Top As Single, Width As Single, Height As Single, Compress As MsoPictureCompress) As Shape

Parameters

Filename
String

The file from which the OLE object is to be created.

LinkToFile
MsoTriState

Determines whether the picture will be linked to the file from which it was created.

SaveWithDocument
MsoTriState

Determines whether the linked picture will be saved with the document into which it is inserted. This argument must be msoTrue if LinkToFile is msoFalse.

Left
Single

The position, measured in points, of the left edge of the picture relative to the left edge of the worksheet.

Top
Single

The position, measured in points, of the top edge of the picture relative to the top edge of the worksheet.

Width
Single

The width of the picture, measured in points.

Height
Single

The height of the picture, measured in points.

Compress
MsoPictureCompress

Determines whether the picture should be compressed when inserted.

Returns

Shape

Applies to