Compartir a través de


XmlMappedRange.CopyPicture(XlPictureAppearance, XlCopyPictureFormat) Método

Definición

Copia el control XmlMappedRange al Portapapeles como imagen.

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

Parámetros

Appearance
XlPictureAppearance

Especifica cómo se debe copiar la imagen. Puede ser una de las siguientes XlPictureAppearance constantes: xlPrinterxlScreen

Format
XlCopyPictureFormat

Formato de la imagen. Puede ser una de las siguientes XlCopyPictureFormat constantes: xlBitmapxlPicture

Devoluciones

Ejemplos

En el ejemplo de código siguiente se usa el CopyPicture método para copiar un objeto XmlMappedRange en el Portapapeles como mapa de bits. En este ejemplo de código se supone que la hoja de cálculo actual contiene un XmlMappedRange denominado 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

Comentarios

Parámetros opcionales

Para obtener información sobre los parámetros opcionales, vea Parámetros opcionales en soluciones de Office.

Se aplica a