Declaration
Automation:
void  Paste2 ( [in]   ulong  Offset, [in]   enum TextType  type, [in]   bool  InsertMode) ;
Native (C++):
HRESULT  Paste2 ( [in]   unsigned __int64  Offset, [in]   BOOL  InsertMode) ;
Parameters
OffsetPaste offsettype

Type of text in the Clipboard. Used only if Clipboard contains textual data, otherwise ignored. Can be one of the following values:

Text Type Value Description
TextTypeHexByte 0 Hexadecimal numbers (from 0 to 0xFF)
TextTypeHexWord 1 Hexadecimal numbers (from 0 to 0xFFFF)
TextTypeHexDword 2 Hexadecimal numbers (from 0 to 0xFFFF FFFF)
TextTypeHexQword 3 Hexadecimal numbers (from 0 to 0xFFFF FFFF FFFF FFFF)
TextTypeDecByte 4 Decimal numbers (from 0 to 255)
TextTypeDecWord 5 Decimal numbers (from 0 to 65535)
TextTypeDecDword 6 Decimal numbers (from 0 to 4,294,967,295)
TextTypeDecQword 7 Decimal numbers (from 0 to 18,446,744,073,709,551,615)

A number may be prefixed by the "0x" prefix which forces it to be in base 16.

InsertModeTrue 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.
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.Paste2(20, TypeHexByte, true);
fdoc.Paste2(100, TypeHexByte, false);