NamedRange.CopyPicture(XlPictureAppearance, XlCopyPictureFormat) Yöntem

Tanım

NamedRange Denetimi Pano'ya resim olarak kopyalar.

public object CopyPicture (Microsoft.Office.Interop.Excel.XlPictureAppearance Appearance = Microsoft.Office.Interop.Excel.XlPictureAppearance.xlScreen, Microsoft.Office.Interop.Excel.XlCopyPictureFormat Format = Microsoft.Office.Interop.Excel.XlCopyPictureFormat.xlPicture);
abstract member CopyPicture : Microsoft.Office.Interop.Excel.XlPictureAppearance * Microsoft.Office.Interop.Excel.XlCopyPictureFormat -> obj
Public Function CopyPicture (Optional Appearance As XlPictureAppearance = Microsoft.Office.Interop.Excel.XlPictureAppearance.xlScreen, Optional Format As XlCopyPictureFormat = Microsoft.Office.Interop.Excel.XlCopyPictureFormat.xlPicture) As Object

Parametreler

Appearance
XlPictureAppearance

Resmin nasıl kopyalanması gerektiğini belirtir. Aşağıdaki XlPictureAppearance sabitlerden biri olabilir: xlPrinterxlScreen

Format
XlCopyPictureFormat

Resmin biçimi. Aşağıdaki XlCopyPictureFormat sabitlerden biri olabilir: xlBitmapxlPicture

Döndürülenler

Örnekler

Aşağıdaki kod örneği bir NamedRange oluşturur ve bunu Smith sözcüğüyle doldurur. Daha sonra yöntemini kullanarak CopyPicture öğesini Pano'ya bit eşlem olarak kopyalar NamedRange .

Bu örnek, belge düzeyinde özelleştirme içindir

Microsoft.Office.Tools.Excel.NamedRange copyBitmapRange;
private void CopyAsBitmap()
{
    copyBitmapRange = this.Controls.AddNamedRange(
        this.Range["C3"], "copyBitmapRange");
    this.copyBitmapRange.Value2 = "Smith";
    this.copyBitmapRange.CopyPicture(
        Excel.XlPictureAppearance.xlScreen,
        Excel.XlCopyPictureFormat.xlBitmap);
}
Private copyBitmapRange As Microsoft.Office.Tools.Excel.NamedRange

Private Sub CopyAsBitmap()
    copyBitmapRange = Me.Controls.AddNamedRange( _
        Me.Range("C3"), "copyBitmapRange")
    Me.copyBitmapRange.Value2 = "Smith"
    Me.copyBitmapRange.CopyPicture( _
        Excel.XlPictureAppearance.xlScreen, _
        Excel.XlCopyPictureFormat.xlBitmap)
End Sub

Açıklamalar

İsteğe Bağlı Parametreler

İsteğe bağlı parametreler hakkında bilgi için bkz. Office Çözümlerinde İsteğe Bağlı Parametreler.

Şunlara uygulanır