XmlMappedRange.PasteSpecial Method

Definition

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

public object PasteSpecial (Microsoft.Office.Interop.Excel.XlPasteType Paste = Microsoft.Office.Interop.Excel.XlPasteType.xlPasteAll, Microsoft.Office.Interop.Excel.XlPasteSpecialOperation Operation = Microsoft.Office.Interop.Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone, object SkipBlanks, object Transpose);
abstract member PasteSpecial : Microsoft.Office.Interop.Excel.XlPasteType * Microsoft.Office.Interop.Excel.XlPasteSpecialOperation * obj * obj -> obj
Public Function PasteSpecial (Optional Paste As XlPasteType = Microsoft.Office.Interop.Excel.XlPasteType.xlPasteAll, Optional Operation As XlPasteSpecialOperation = Microsoft.Office.Interop.Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone, Optional SkipBlanks As Object, Optional Transpose As Object) As Object

Parameters

SkipBlanks
Object

true to not have blank cells in the range on the Clipboard pasted into the destination range. The default value is false.

Transpose
Object

true to transpose rows and columns when the range is pasted. The default value is false.

Returns

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 void CopyAndPaste()
{
    this.CustomerLastNameCell.Value2 = "Smith";
    this.CustomerLastNameCell.Copy();
    this.CustomerFirstNameCell.PasteSpecial(
        Excel.XlPasteType.xlPasteValues,
        Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone,
        false, false);
}
Private Sub CopyAndPaste()
    Me.CustomerLastNameCell.Value2 = "Smith"
    Me.CustomerLastNameCell.Copy()
    Me.CustomerFirstNameCell.PasteSpecial(Excel.XlPasteType.xlPasteValues, _
        Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone, False, False)
End Sub

Remarks

Optional Parameters

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

Applies to