Declaration
Automation:
void  Paste ( [in]   ulong  Offset, [in]   bool  InsertMode) ;
Native (C++):
HRESULT  Paste ( [in]   unsigned __int64  Offset, [in]   BOOL  InsertMode) ;
Parameters
OffsetPaste offsetInsertModeTrue to insert data, False to overwrite data.
Return Value
S_OK or standard OLE error code.
Remarks

Pastes data from the Clipboard to the given position. Pasted data either ovewrites the current document's data, or is inserted into the document, shifting existing data forward, depending on the InsertMode parameter.

This method is superseded by IFileDocument.Paste2 method, but is still supported.

Examples

Using Paste

C#Copy Code
FileDocumentLib.FildDocument fdoc = new FileDocumentLib.FildDocument();
FileDocumentLib.IMultiSelection msel = fdoc.CreateEmptySelection();

msel.AddRange(0, 10);
fdoc.Copy(msel, false);

fdoc.Paste(20, true); // Equivalent to fdoc.Paste2(20, TypeHexByte, true);
fdoc.Paste(100, false); // Equivalent to fdoc.Paste2(100, TypeHexByte, false);
    

See Also