共用方式為


XmlMappedRange.CopyPicture Method

Copies the XmlMappedRange control to the Clipboard as a picture.

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
)

Parameters

Return Value

Type: System.Object

Remarks

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Examples

The following code example uses the CopyPicture method to copy an XmlMappedRange to the Clipboard as a bitmap. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

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 Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace