XmlMappedRange.Copy Method (2007 System)
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.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public Function Copy ( _
Destination As Object _
) As Object
'Usage
Dim instance As XmlMappedRange
Dim Destination As Object
Dim returnValue As Object
returnValue = instance.Copy(Destination)
public Object Copy(
Object Destination
)
public:
Object^ Copy(
Object^ Destination
)
public function Copy(
Destination : Object
) : Object
Parameters
Destination
Type: System.ObjectSpecifies 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: System.Object
Remarks
Optional Parameters
For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.
Examples
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 Sub CopyAndPaste()
Me.CustomerLastNameCell.Value2 = "Smith"
Me.CustomerLastNameCell.Copy()
Me.CustomerFirstNameCell.PasteSpecial(Excel.XlPasteType.xlPasteValues, _
Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone, False, False)
End Sub
private void CopyAndPaste()
{
this.CustomerLastNameCell.Value2 = "Smith";
this.CustomerLastNameCell.Copy(missing);
this.CustomerFirstNameCell.PasteSpecial(
Excel.XlPasteType.xlPasteValues,
Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone,
false, false);
}
.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.