Class
WordBookmark
OfficeIMO.Word
Represents a bookmark within a Word document.
Inheritance
- WordElement
- WordBookmark
Usage
Explore 13 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 13
- Method WordBookmark.AddBookmark
- Method WordDocument.AddBookmark
- Property WordDocument.Bookmarks
- Method WordFooter.AddBookmark
- Property WordFooter.Bookmarks
- Method WordHeader.AddBookmark
- Property WordHeader.Bookmarks
- Method WordHeaderFooter.AddBookmark
- Property WordHeaderFooter.Bookmarks
- Method WordParagraph.AddBookmark
- Property WordParagraph.Bookmark
- Method WordRange.AddBookmark
- Property WordSection.Bookmarks
Methods
public static WordBookmark AddBookmark(WordParagraph paragraph, string bookmarkName) #Adds a bookmark to the specified paragraph.
Parameters
- paragraph OfficeIMO.Word.WordParagraph
- Paragraph to contain the bookmark.
- bookmarkName string
- Name of the bookmark.
public WordRange GetRange() #Returns the range between the bookmark's start and end.
Inherited Methods
Properties
public WordParagraph Paragraph { get; } #Gets the paragraph containing the bookmark.
public string Text { get; set; } #Gets or sets the text the bookmark spans. Paragraph breaks are returned as \n. Setting the text replaces the bookmarked content and keeps the bookmark around the new text, so REF and cross-reference fields show it after their next update.