Method InsertText
InsertText(BookmarkReference, string, BookmarkInsertPosition, CharacterFormat?)
Inserts a text run at a bookmark.
public static TextRun InsertText(this BookmarkReference bookmark, string text, BookmarkInsertPosition position = BookmarkInsertPosition.AtEnd, CharacterFormat? format = null)
Parameters
bookmarkBookmarkReferenceThe bookmark.
textstringThe text to insert.
positionBookmarkInsertPositionWhere the text goes relative to the markers.
formatCharacterFormatThe run formatting, or null to specify none.
Returns
- TextRun
The inserted run.
Exceptions
- ArgumentNullException
An argument is null.