Freigeben über


XmlMappedRange.CopyPicture-Methode

Kopiert das XmlMappedRange-Steuerelement als Bild in die Zwischenablage.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
Function CopyPicture ( _
    Appearance As XlPictureAppearance, _
    Format As XlCopyPictureFormat _
) As Object
Object CopyPicture(
    XlPictureAppearance Appearance,
    XlCopyPictureFormat Format
)

Parameter

Rückgabewert

Typ: System.Object

Hinweise

Optionale Parameter

Informationen zu optionalen Parametern finden Sie unter Optionale Parameter in Office-Lösungen.

Beispiele

Im folgenden Codebeispiel wird mithilfe der CopyPicture-Methode ein XmlMappedRange als Bitmap in die Zwischenablage kopiert.In diesem Codebeispiel wird davon ausgegangen, dass das aktuelle Arbeitsblatt einen XmlMappedRange mit dem Namen CustomerLastNameCell enthält.

Private Sub CopyAsBitmap()
    Me.CustomerLastNameCell.Value2 = "Smith"
    Me.CustomerLastNameCell.CopyPicture( _
        Excel.XlPictureAppearance.xlScreen, Excel.XlCopyPictureFormat.xlBitmap)
End Sub
private void CopyAsBitmap()
{
    this.CustomerLastNameCell.Value2 = "Smith";
    this.CustomerLastNameCell.CopyPicture(
        Excel.XlPictureAppearance.xlScreen, 
        Excel.XlCopyPictureFormat.xlBitmap);
}

.NET Framework-Sicherheit

Siehe auch

Referenz

XmlMappedRange Schnittstelle

Microsoft.Office.Tools.Excel-Namespace