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
Appearance
Type: Microsoft.Office.Interop.Excel.XlPictureAppearanceSpecifies how the picture should be copied.
Can be one of the following XlPictureAppearance constants:
Format
Type: Microsoft.Office.Interop.Excel.XlCopyPictureFormatThe format of the picture.
Can be one of the following XlCopyPictureFormat constants:
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.