Declaration
Automation:
void  Insert ( [in]   ref byte  pData, [in]   ulong  off, [in]   uint  insert_size) ;
Native (C++):
HRESULT  Insert ( [in]   unsigned char *  pData, [in]   unsigned __int64  off, [in]   unsigned long  insert_size) ;
Parameters
pDataPointer to a patternoffInsert offsetinsert_sizePattern size
Return Value
S_OK or standard OLE error code.
Remarks
Inserts a pattern into the document. Insert command shifts file's data to free up the space to fit an inserted pattern. Complexity: constant-time.
Examples

Inserting a pattern

C#Copy Code
// fdoc is initialized elsewhere
byte[] pattern = new byte[] { 0x0d, 0x0a };
fdoc.Insert(ref pattern[0], 100, pattern.Length);  // insert a given pattern at the offset 100