XmlMappedRange.CopyPicture(XlPictureAppearance, XlCopyPictureFormat) Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
XmlMappedRange Menyalin kontrol ke Papan Klip sebagai gambar.
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
Parameter
- Appearance
- XlPictureAppearance
Menentukan bagaimana gambar harus disalin. Bisa menjadi salah satu konstanta berikut XlPictureAppearance : xlPrinterxlScreen
- Format
- XlCopyPictureFormat
Format gambar. Bisa menjadi salah satu konstanta berikut XlCopyPictureFormat : xlBitmapxlPicture
Mengembalikan
Contoh
Contoh kode berikut menggunakan CopyPicture metode untuk menyalin XmlMappedRange ke Clipboard sebagai bitmap. Contoh kode ini mengasumsikan bahwa lembar kerja saat ini berisi yang XmlMappedRange bernama CustomerLastNameCell
.
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
Keterangan
Parameter Opsional
Untuk informasi tentang parameter opsional, lihat Parameter Opsional di Solusi Office.