Declaration
Automation:
void  InsertPattern ( [in]   ref byte  pPattern, [in]   uint  pattern_size, [in]   ulong  off, [in]   ulong  Size) ;
Native (C++):
HRESULT  InsertPattern ( [in]   unsigned char *  pPattern, [in]   unsigned long  pattern_size, [in]   unsigned __int64  off, [in]   unsigned __int64  Size) ;
Parameters
pPatternPointer to a patternpattern_sizePattern SizeoffInsert offsetSizeInsert size
Return Value
S_OK or standard OLE error code.
Remarks
Inserts a given pattern into the document, repeating it to fill the given size. 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.InsertPattern(ref pattern[0], pattern.Length, 100, 1000);