Method DeleteMath
DeleteMath(WordDocument, MathPosition, int)
Deletes a range of one slot: characters of its runs and whole structures.
public static EquationEdit DeleteMath(this WordDocument document, MathPosition from, int length)
Parameters
documentWordDocumentThe document that holds the equation.
fromMathPositionThe range's start; a range edge inside a surrogate pair takes in the whole pair.
lengthintHow many offsets; clamped to the slot's end. Zero or less gives an empty edit.
Returns
- EquationEdit
The edit; After is the range's start. A slot may be left empty; the structure that holds it stays.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The equation is not in
document.- InvalidOperationException
The position no longer names a slot of the equation.