Share via


Bookmark Interface

Definition

The Bookmark control is a bookmark that has a unique name, exposes events, and can be bound to data.

public interface class Bookmark : IDisposable, System::ComponentModel::IComponent, System::ComponentModel::ISupportInitialize, System::Windows::Forms::IBindableComponent
[System.Runtime.InteropServices.Guid("716bd356-0f64-430b-9ea0-bde2921a0227")]
public interface Bookmark : IDisposable, System.ComponentModel.IComponent, System.ComponentModel.ISupportInitialize, System.Windows.Forms.IBindableComponent
[<System.Runtime.InteropServices.Guid("716bd356-0f64-430b-9ea0-bde2921a0227")>]
type Bookmark = interface
    interface IBindableComponent
    interface IComponent
    interface IDisposable
    interface ISupportInitialize
Public Interface Bookmark
Implements IBindableComponent, IComponent, IDisposable, ISupportInitialize
Attributes
Implements

Remarks

Use the AddBookmark method to add a bookmark to a document range.

Note

This interface is implemented by the Visual Studio Tools for Office runtime. It is not intended to be implemented in your code. For more information, see Visual Studio Tools for Office Runtime Overview.

Usage

This documentation describes the version of this type that is used in Office projects that target the .NET Framework 4 or later. In projects that target the .NET Framework 3.5, this type might have different members and the code examples provided for this type might not work. For documentation about this type in projects that target the .NET Framework 3.5, see the following reference section in the Visual Studio 2008 documentation: http://go.microsoft.com/fwlink/?LinkId=160658.

Properties

Application

Gets an Application that represents the creator of the Bookmark control.

Bold

Gets or sets a value that indicates whether the text in the Bookmark control is formatted as bold.

BoldBi

Gets or sets a value that indicates whether the text in the Bookmark control is formatted as bold.

BookmarkID

Gets the position of the Bookmark control in the document.

Bookmarks

Gets a Bookmarks collection that represents all the bookmarks inside of the Bookmark control.

Borders

Gets a Borders collection that represents all the borders for the Bookmark control.

Case

Gets or sets a WdCharacterCase constant that represents the case of the text in the Bookmark control.

Cells

Gets a Cells collection that represents the table cells in a Bookmark control.

Characters

Gets a Characters collection that represents the characters in a Bookmark control.

CharacterStyle

Gets the style that is used to format one or more characters in the Bookmark.

CharacterWidth

Gets or sets the character width of the text in the Bookmark control.

Column

Gets a value that indicates whether the Bookmark control is a table column.

Columns

Gets a Columns collection that represents all the table columns in the Bookmark control.

CombineCharacters

Gets or sets a value that indicates whether the Bookmark control contains combined characters.

Comments

Gets a Comments collection that represents all the comments in the Bookmark control.

Conflicts

Gets all the co-authoring conflicts in the Bookmark.

Container
ContentControls

Gets the content controls that are contained in the Bookmark.

Creator

Gets a value that indicates the application in which the Bookmark control was created.

DefaultDataSourceUpdateMode

Gets or sets the default DataSourceUpdateMode for the Bookmark.

DisableCharacterSpaceGrid

Gets or sets a value that indicates whether Microsoft Office Word ignores the number of characters per line for the corresponding Bookmark control.

Document

Gets the Document associated with the Bookmark control.

Duplicate

Gets a read-only Range object that represents all the properties of the Bookmark control.

Editors

Gets an Editors object that represents all the users authorized to modify a Bookmark control within a document.

EmphasisMark

Gets or sets the emphasis mark for a character or designated character string within a Bookmark control.

Empty

Gets a value that indicates whether the Bookmark control is empty.

End

Gets or sets the ending character position of a Bookmark control.

EndnoteOptions

Gets an EndnoteOptions object that represents the endnotes in Bookmark control.

Endnotes

Gets an Endnotes collection that represents all the endnotes in a Bookmark control.

EnhMetaFileBits

Gets a picture representation of how the range of the Bookmark control appears.

Fields

Gets a read-only Fields collection that represents all the fields in the Bookmark control.

Find

Gets a Find object that contains the criteria for a find operation within a Bookmark control.

FitTextWidth

Gets or sets the width (in the current measurement units) in which Microsoft Office Word fits the text in the Bookmark control.

Font

Gets or sets a Font object that represents the character formatting of the text assigned to a Bookmark control.

FootnoteOptions

Gets a FootnoteOptions object that represents the footnotes in a Bookmark control.

Footnotes

Gets a Footnotes collection that represents all the footnotes in a Bookmark control.

FormattedText

Gets or sets a Range object that includes the formatted text in the Bookmark control.

FormFields

Gets a FormFields collection that represents all the form fields in the Bookmark control.

Frames

Gets a Frames collection that represents all the frames in a Bookmark control.

GrammarChecked

Gets or sets a value that indicates whether a grammar check has been run on the Bookmark control.

GrammaticalErrors

Gets a ProofreadingErrors collection that represents the sentences that failed the grammar check on the Bookmark control.

HighlightColorIndex

Gets or sets the highlight color for the Bookmark control.

HorizontalInVertical

Gets or sets the formatting for horizontal text set within vertical text in the Bookmark control.

HTMLDivisions

Gets an HTMLDivisions object that represents an HTML division in a Web document.

Hyperlinks

Gets a Hyperlinks collection that represents all the hyperlinks in the Bookmark control.

ID

Gets or sets the identifying label for the Bookmark control when the current document is saved as a Web page.

Information

Gets information about the Bookmark control.

InlineShapes

Gets an InlineShapes collection that represents all the InlineShape objects in a Bookmark control.

InnerObject

Gets the underlying Bookmark object of the Bookmark control.

IsEndOfRowMark

Gets a value that indicates whether the Bookmark control is collapsed and is located at the end-of-row mark in a table.

Italic

Gets or sets a value indicating whether the text in a Bookmark control is formatted as italic.

ItalicBi

Gets or sets a value that indicates whether the text in the Bookmark control is formatted as italic.

Kana

Gets or sets a value that indicates whether the specified range of Japanese language text in a Bookmark control is hiragana or katakana.

LanguageDetected

Gets or sets a value that indicates whether Microsoft Office Word has detected the language of the text in the Bookmark control.

LanguageID

Gets or sets the language for the Bookmark control.

LanguageIDFarEast

Gets or sets an East Asian language for the Bookmark control.

LanguageIDOther

Gets or sets the language for the Bookmark control.

ListFormat

Gets a ListFormat object that represents all the list formatting characteristics of a Bookmark control.

ListParagraphs

Gets a ListParagraphs collection that represents all the numbered paragraphs in the Bookmark control.

ListStyle

Gets the style that is used to format a bulleted list or numbered list in the Bookmark.

Locks

Gets the co-authoring locks in the Bookmark.

Name

Gets the name of the Bookmark control.

NextStoryRange

Gets a Range object that refers to the next story, as shown in the following table.

NoProofing

Gets or set a value that indicates whether the spelling and grammar checker ignores the text in the Bookmark control.

OMaths

Gets the equations that are contained in the Bookmark.

Orientation

Gets or sets the orientation of text in a Bookmark control when the Text Direction feature is enabled.

PageSetup

Gets or sets the PageSetup that is associated with the range of the Bookmark control.

ParagraphFormat

Gets or sets a ParagraphFormat object that represents the paragraph settings for the Bookmark control.

Paragraphs

Gets a Paragraphs collection that represents all the paragraphs in the Bookmark control.

ParagraphStyle

Gets the style that is used to format paragraphs in the Bookmark.

Parent

Gets the parent object of the Bookmark control.

ParentContentControl

Gets the parent content control for the Bookmark.

PreviousBookmarkID

Gets a value that represents the number of the last bookmark that starts before or at the same place as the Bookmark control.

Range

Gets a Range object that represents the portion of a document that is contained in the Bookmark control.

ReadabilityStatistics

Gets a ReadabilityStatistics collection that represents the readability statistics for the Bookmark control.

Revisions

Gets a Revisions collection that represents the tracked changes in the Bookmark control.

Rows

Gets a Rows collection that represents all the table rows in a Bookmark control.

Scripts

Gets a Scripts collection that represents the collection of HTML scripts in the Bookmark control.

Sections

Gets a Sections collection that represents the sections in the Bookmark control.

Sentences

Gets a Sentences collection that represents all the sentences in the Bookmark control.

Shading

Gets a Shading object that refers to the shading formatting for the Bookmark control.

ShapeRange

Gets a ShapeRange collection that represents all the Shape objects in the Bookmark control.

ShowAll

Gets or sets a value that indicates whether all nonprinting characters (such as hidden text, tab marks, space marks, and paragraph marks) within a Bookmark control are displayed.

SpellingChecked

Gets or sets a value that indicates whether spelling has been checked throughout the Bookmark control.

SpellingErrors

Gets a ProofreadingErrors collection that represents the words identified as spelling errors in the Bookmark control.

Start

Gets or sets the starting character position of a Bookmark control.

StoryLength

Gets the number of characters in the story that contains the Bookmark control.

StoryType

Gets the story type for the Bookmark control.

Style

Gets or sets the style for the Bookmark control.

SynonymInfo

Gets a SynonymInfo that contains information from the thesaurus on synonyms, antonyms, or related words and expressions for the text in the Bookmark control.

Tables

Gets a Tables collection that represents all the tables in the Bookmark control.

TableStyle

Gets the style that is used to format tables in the Bookmark.

Tag
Text

Gets or sets the text in the Bookmark control.

TextRetrievalMode

Gets or sets a TextRetrievalMode object that controls how text is retrieved from the Bookmark control.

TopLevelTables

Gets a Tables collection that represents the tables at the outermost nesting level in the range of the Bookmark control.

TwoLinesInOne

Gets or sets a value that indicates whether Microsoft Office Word sets two lines of text in one and specifies the characters, if any, that enclose the text in a Bookmark control.

Underline

Gets or sets the type of underline applied to the text of the Bookmark control.

Updates

Gets all the available co-authoring updates in the Bookmark.

WordOpenXML

Gets the contents of the Bookmark in the Word Open XML format.

Words

Gets a Words collection that represents all the words in a Bookmark control.

XML

Gets the XML text in the Bookmark control.

XMLNodes

Gets an XMLNodes collection that represents the collection of all XML elements within a Bookmark control, including those elements that are only partially within the Bookmark control.

XMLParentNode

Gets an XMLNode object that represents the parent node of a Bookmark control.

Methods

AutoFormat()

Automatically formats a Bookmark control.

Calculate()

Calculates a mathematical expression within a Bookmark control.

CheckGrammar()

Begins a spelling and grammar check for the Bookmark control.

CheckSpelling(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Begins a spelling check for the document from the start of the Bookmark control to the end of the document.

CheckSynonyms()

Displays the Thesaurus dialog box, which lists alternative word choices, or synonyms, for the text in the Bookmark control.

Collapse(Object)

Collapses a Bookmark control to the starting or ending position.

ComputeStatistics(WdStatistic)

Gets a statistic based on the contents of the Bookmark control.

ConvertHangulAndHanja(Object, Object, Object, Object, Object)

Converts the Bookmark control text from Hangul to Hanja or vice versa.

ConvertToTable(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Converts text within a Bookmark control to a table.

Copy()

Creates a new Bookmark in the same location as the existing Bookmark control.

Copy(String)

Creates a new Bookmark with the specified Name argument in the same location as the existing Bookmark control.

CopyAsPicture()

The CopyAsPicture() method copies the contents of the Bookmark control to the Clipboard.

Cut()

Removes the contents of the Bookmark control from the document and places it in the Clipboard.

Delete()

Deletes a dynamically created Bookmark from the document and removes it from the ControlCollection.

DetectLanguage()

Analyzes the text of the Bookmark control to determine the language that it is written in.

EndOf(Object, Object)

Moves or extends the ending character position of a Bookmark control to the end of the nearest text unit.

Expand(Object)

Expands the Bookmark control.

ExportAsFixedFormat(String, WdExportFormat, Boolean, WdExportOptimizeFor, Boolean, WdExportItem, Boolean, Boolean, WdExportCreateBookmarks, Boolean, Boolean, Boolean, Object)

Saves the Bookmark in PDF or XPS format.

ExportFragment(String, WdSaveFormat)

Exports the Bookmark to a document for use as a document fragment.

GetSpellingSuggestions(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Gets a SpellingSuggestions collection that represents the words suggested as spelling replacements for the first word in the Bookmark control.

GoTo(Object, Object, Object, Object)

Gets a Range object that represents the start position of an item within the Bookmark control.

GoToEditableRange(Object)

Gets a Range object that represents an area of a Bookmark control that can be modified by the user or group of users.

GoToNext(WdGoToItem)

Gets a Range object that refers to the start position of the next item or location within the Bookmark control specified by the What argument.

GoToPrevious(WdGoToItem)

Gets a Range object that refers to the start position of the previous item or location in the Bookmark control specified by the What argument.

ImportFragment(String, Boolean)

Imports a document fragment into the Bookmark.

InRange(Range)

Determines if the Range to which the method is applied is contained in the Bookmark control.

InsertAfter(String)

Inserts the specified text at the end of a Bookmark control.

InsertAlignmentTab(Int32, Int32)

Inserts an absolute tab in the Bookmark that is always positioned in the same spot, relative to either the margins or indents.

InsertAutoText()

Attempts to match the text in the Bookmark control with an existing AutoText entry name.

InsertBefore(String)

Inserts the specified text before the Bookmark control.

InsertBreak(Object)

Inserts a page, column, or section break into the Bookmark control.

InsertCaption(Object, Object, Object, Object, Object)

Inserts a caption immediately preceding or following the Bookmark control.

InsertCrossReference(Object, WdReferenceKind, Object, Object, Object, Object, Object)

Inserts a cross-reference to a heading, bookmark, footnote, or endnote, or to an item for which a caption label is defined (for example, an equation, figure, or table) into a Bookmark control.

InsertDatabase(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Retrieves data from a data source (for example, a separate Microsoft Office Word document, a Microsoft Office Excel worksheet, or a Microsoft Access database) and inserts the data as a table in place of the Bookmark control.

InsertDateTime(Object, Object, Object, Object, Object)

Inserts the current date or time, or both, either as text or as a TIME field in the Bookmark control.

InsertFile(String, Object, Object, Object, Object)

Inserts all or part of the specified file into the Bookmark control.

InsertParagraph()

Replaces the Bookmark control with a new paragraph.

InsertParagraphAfter()

Inserts a paragraph mark after a Bookmark control.

InsertParagraphBefore()

Inserts a new paragraph before the Bookmark control.

InsertSymbol(Int32, Object, Object, Object)

Inserts a symbol in place of the Bookmark control.

InsertXML(String, Object)

Inserts the specified XML text into the Bookmark control.

InStory(Range)

Determines if the Bookmark control to which this method is applied is in the same story as the range specified by the Range argument.

IsEqual(Range)

Determines if the Bookmark control to which this method is applied is equal to the range specified by the Range argument.

LookupNameProperties()

Looks up a name in the global address book list and displays the Properties dialog box, which includes information about the specified name of the Bookmark control.

ModifyEnclosure(Object, Object, Object)

Adds, modifies, or removes an enclosure around the specified character or characters in the Bookmark control.

Move(Object, Object)
MoveEnd(Object, Object)

Moves the ending character position of a Bookmark control.

MoveEndUntil(Object, Object)

Moves the end position of the Bookmark control until any of the specified characters are found in the document.

MoveEndWhile(Object, Object)

Moves the ending character position of a Bookmark control while any of the specified characters are found in the document.

MoveStart(Object, Object)

Moves the start position of the Bookmark control.

MoveStartUntil(Object, Object)

Moves the start position of the Bookmark control until one of the specified characters is found in the document.

MoveStartWhile(Object, Object)

Moves the start position of the Bookmark control while any of the specified characters are found in the document.

MoveUntil(Object, Object)

Moves the Bookmark control until one of the specified characters is found in the document.

MoveWhile(Object, Object)

Moves the Bookmark control while any of the specified characters are found in the document.

Next(Object, Object)

Gets a Range object that represents the specified unit relative to the Bookmark control.

Paste()

Inserts the contents of the Clipboard into the Bookmark control.

PasteAndFormat(WdRecoveryType)

Pastes the selected table cells into the Bookmark control and formats them as specified.

PasteAppendTable()

Merges pasted cells into an existing table in a Bookmark control by inserting the pasted rows between the selected rows.

PasteAsNestedTable()

Pastes a cell or group of cells as a nested table into the Bookmark control.

PasteExcelTable(Boolean, Boolean, Boolean)

Pastes and formats a Microsoft Office Excel table into the Bookmark control.

PasteSpecial(Object, Object, Object, Object, Object, Object, Object)

Inserts the contents of the Clipboard into the Bookmark control.

PhoneticGuide(String, WdPhoneticGuideAlignmentType, Int32, Int32, String)

Adds phonetic guides to the Bookmark control.

Previous(Object, Object)

Gets a Range object relative to the Bookmark control.

Relocate(Int32)

In outline view, moves the paragraphs within the Bookmark control after the next visible paragraph or before the previous visible paragraph.

Select()

Selects the Bookmark control.

SetListLevel(Int16)

Sets the list level for one or more items in a numbered list in the Bookmark.

SetRange(Int32, Int32)

Sets the starting and ending character positions for the Bookmark control.

Sort(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Sorts the paragraphs in the Bookmark control.

SortAscending()

Sorts paragraphs or table rows in ascending alphanumeric order within a Bookmark control.

SortDescending()

Sorts paragraphs or table rows in descending alphanumeric order within a Bookmark control.

StartOf(Object, Object)

Moves or extends the start position of the Bookmark control to the beginning of the nearest specified text unit.

TCSCConverter(WdTCSCConverterDirection, Boolean, Boolean)

Converts the specified range of a Bookmark control from Traditional Chinese to Simplified Chinese or vice versa.

WholeStory()

Expands a Bookmark control to include the entire story.

Events

BeforeDoubleClick

Occurs when a Bookmark control is double-clicked, before the default double-click action.

BeforeRightClick

Occurs when a Bookmark control is right-clicked, before the default right-click action.

BindingContextChanged

Occurs when the value of the BindingContext property of the Bookmark changes.

Deselected

Occurs when selection moves from the Bookmark control to an area outside of the Bookmark control.

Selected

Occurs when the Bookmark control is selected.

SelectionChange

Occurs when the selection inside the Bookmark control changes.

Applies to