Method MarkIndexEntry
MarkIndexEntry(WordDocument, DocumentPosition, IndexEntryOptions)
Marks an index entry at a position, as one undoable edit (Word's Mark Entry): XE "Main:Sub" with
\t, \b and \i, a field with no result, placed where the marked text ends.
public static DocumentEdit MarkIndexEntry(this WordDocument document, DocumentPosition at, IndexEntryOptions entry)
Parameters
documentWordDocumentThe document that holds the position.
atDocumentPositionWhere the field goes: the end of the marked text.
entryIndexEntryOptionsThe entry.
Returns
- DocumentEdit
The edit; After is just after the field.
Exceptions
- ArgumentNullException
documentorentryis null.- ArgumentException
The position is not in
document, or a text is not a valid entry (IsValidEntry(string?)).