Share via


XmlMappedRange.CopyPicture(XlPictureAppearance, XlCopyPictureFormat) メソッド

定義

XmlMappedRange コントロールをピクチャとしてクリップボードにコピーします。

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

パラメーター

Appearance
XlPictureAppearance

画像のコピー方法を指定します。次 XlPictureAppearance のいずれかの定数を指定できます。 xlPrinterxlScreen

Format
XlCopyPictureFormat

画像の形式。次 XlCopyPictureFormat のいずれかの定数を指定できます。 xlBitmapxlPicture

戻り値

次のコード例では、 メソッドを CopyPicture 使用して、 をビットマップとしてクリップボードにコピー XmlMappedRange します。 このコード例では、現在のワークシートに という名前CustomerLastNameCellの が含まれていることをXmlMappedRange前提としています。

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

注釈

省略可能のパラメーター

省略可能なパラメーターの詳細については、「 Office ソリューションの省略可能なパラメーター」を参照してください。

適用対象