XmlMappedRange.PasteSpecial Method

Pastes the contents of a Range from the Clipboard into the XmlMappedRange control.

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

Syntax

'Declaration
Function PasteSpecial ( _
    Paste As XlPasteType, _
    Operation As XlPasteSpecialOperation, _
    SkipBlanks As Object, _
    Transpose As Object _
) As Object
Object PasteSpecial(
    XlPasteType Paste,
    XlPasteSpecialOperation Operation,
    Object SkipBlanks,
    Object Transpose
)

Parameters

  • SkipBlanks
    Type: System.Object
    true to not have blank cells in the range on the Clipboard pasted into the destination range. The default value is false.
  • Transpose
    Type: System.Object
    true to transpose rows and columns when the range is pasted. The default value is false.

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 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

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace