Table of Contents

Method MarkIndexEntry

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

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

document WordDocument

The document that holds the position.

at DocumentPosition

Where the field goes: the end of the marked text.

entry IndexEntryOptions

The entry.

Returns

DocumentEdit

The edit; After is just after the field.

Exceptions

ArgumentNullException

document or entry is null.

ArgumentException

The position is not in document, or a text is not a valid entry (IsValidEntry(string?)).