Table of Contents

Class NoteConversionExtensions

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

Word's References > Footnotes > Convert as undoable edits (WQ-0116, tools/Probe-WordNoteConvert.ps1): footnotes to endnotes, endnotes to footnotes, the two swapped, or one note; and a note inserted with a custom mark.

public static class NoteConversionExtensions
Inheritance
NoteConversionExtensions
Inherited Members

Remarks

A converted note keeps its text; its kind, its reference's kind and the kind's styles change (Footnote Text and Footnote Reference become Endnote Text and Endnote Reference, and back), and a custom mark stays. Word also gives the kind's notes new ids in document order; DocWright gives a converted note the next free id of its new kind, which numbers nothing differently (a note's number is its reference's place).

Fields

MaxCustomMarkLength

The longest custom mark Word's dialog takes.

Methods

ConvertNote(WordDocument, DocumentPosition)

Converts one note to the other kind (Word's "Convert to endnote" on a note): the note the position is in, or whose reference is at the position (just before or after it).

ConvertNotes(WordDocument, NoteKind)

Converts every note of a kind to the other kind (Word's "Convert all footnotes to endnotes" and back).

InsertNote(WordDocument, DocumentPosition, NoteKind, string)

Inserts a footnote or endnote whose mark is a text of the caller's instead of a number (Word's "Custom mark"): the reference (w:customMarkFollows) followed by the mark in the reference style, and the note starting with the mark. Otherwise as InsertNote(WordDocument, DocumentPosition, NoteKind).

IsValidCustomMark(string?)

Gets whether a text can be a custom note mark: 1 to 10 characters, none a control character.

SwapNotes(WordDocument)

Swaps footnotes and endnotes: every footnote becomes an endnote and every endnote a footnote (Word's "Swap").