Method InsertMathText
InsertMathText(WordDocument, MathPosition, string)
Types text into a slot of an equation.
public static EquationEdit InsertMathText(this WordDocument document, MathPosition at, string text)
Parameters
documentWordDocumentThe document that holds the equation.
atMathPositionWhere the text goes; an offset inside a surrogate pair goes after the pair.
textstringThe text, at most MaxMathTextLength characters; line breaks and tabs become spaces.
Returns
- EquationEdit
The edit; After is just past the text. Empty text gives an empty edit.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The equation is not in
document.- ArgumentOutOfRangeException
The text is too long.
- InvalidOperationException
The position no longer names a slot of the equation.