|[Top] [Chapter] [Previous] [Next]|
bool MoveToField( string Name, int Mode, int Option);
This is a versatile methods to jump to and between mail merge fields:
Mode = 0:
Locate the first field in the text, or the first field with the provided name if parameter "name" was not empty.
Mode = 1:
Locate the next field in the text, or the next field with the provided name if parameter "name" was not empty.
Mode = 2:
Locate previous field
Mode = 3
Locate the last field
Option - Bitfield:
If bit 1 was set in parameter "option" the cursor will be positioned inside the field at the start: <|....>
If bit 2 was set in parameter "option" the cursor will be positioned after the end of the field: <....>|
If bit 1 and 2 are set the cursor will be at the end INSIDE the field: <....|>
If Bit 4 and 2 was set, the field will be selected. <....|>
Select the field and the marker:
wpdllInt1.TextCursor.MoveToField("FELD", 0, 6);
Select only the text of the field:
wpdllInt1.TextCursor.MoveToField("FELD", 0, 7);
This example will move to next field (from current position).