Expand Minimize
This topic has not yet been rated - Rate this topic

XmlMappedRange.Copy Method

Copies the contents of the XmlMappedRange control to the specified range or to the Clipboard.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Object Copy(
	Object Destination
)

Parameters

Destination
Type: Object

Specifies the new range to which the XmlMappedRange control is copied. If this argument is omitted, Microsoft Office Excel copies the range to the Clipboard.

Return Value

Type: Object

Optional Parameters

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

The following code example uses the Copy method to copy an XmlMappedRange to the Clipboard, and then uses the PasteSpecial method to copy the range to a different XmlMappedRange. This code example assumes that the current worksheet contains two XmlMappedRange controls named CustomerFirstNameCell and CustomerLastNameCell.

private void CopyAndPaste()
{
    this.CustomerLastNameCell.Value2 = "Smith";
    this.CustomerLastNameCell.Copy();
    this.CustomerFirstNameCell.PasteSpecial(
        Excel.XlPasteType.xlPasteValues,
        Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone,
        false, false);
}
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.