Поделиться через


Bookmark Interface

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

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Syntax

'Declaration
<GuidAttribute("716bd356-0f64-430b-9ea0-bde2921a0227")> _
Public Interface Bookmark _
    Inherits IBindableComponent, IComponent, IDisposable, ISupportInitialize
[GuidAttribute("716bd356-0f64-430b-9ea0-bde2921a0227")]
public interface Bookmark : IBindableComponent, 
    IComponent, IDisposable, ISupportInitialize

The Bookmark type exposes the following members.

Properties

  Name Description
Public property Application Gets an Application that represents the creator of the Bookmark control.
Public property BindingContext Gets or sets the collection of currency managers for the IBindableComponent. (Inherited from IBindableComponent.)
Public property Bold Gets or sets a value that indicates whether the text in the Bookmark control is formatted as bold.
Public property BoldBi Gets or sets a value that indicates whether the text in the Bookmark control is formatted as bold.
Public property BookmarkID Gets the position of the Bookmark control in the document.
Public property Bookmarks Gets a Microsoft.Office.Interop.Word.Bookmarks collection that represents all the bookmarks inside of the Bookmark control.
Public property Borders Gets a Borders collection that represents all the borders for the Bookmark control.
Public property CanEdit Infrastructure.
Public property CanPaste Infrastructure.
Public property Case Gets or sets a WdCharacterCase constant that represents the case of the text in the Bookmark control.
Public property Cells Gets a Cells collection that represents the table cells in a Bookmark control.
Public property Characters Gets a Characters collection that represents the characters in a Bookmark control.
Public property CharacterStyle Gets the style that is used to format one or more characters in the Bookmark.
Public property CharacterWidth Gets or sets the character width of the text in the Bookmark control.
Public property Column Gets a value that indicates whether the Bookmark control is a table column.
Public property Columns Gets a Columns collection that represents all the table columns in the Bookmark control.
Public property CombineCharacters Gets or sets a value that indicates whether the Bookmark control contains combined characters.
Public property Comments Gets a Comments collection that represents all the comments in the Bookmark control.
Public property Conflicts Gets all the co-authoring conflicts in the Bookmark. This property can be used only in Word 2010 projects. 
Public property Container Infrastructure.
Public property ContentControls Gets the content controls that are contained in the Bookmark.
Public property Creator Gets a value that indicates the application in which the Bookmark control was created.
Public property DataBindings Gets the collection of data-binding objects for this IBindableComponent. (Inherited from IBindableComponent.)
Public property DefaultDataSourceUpdateMode Gets or sets the default DataSourceUpdateMode for the Bookmark.
Public property DisableCharacterSpaceGrid Gets or sets a value that indicates whether Microsoft Office Word ignores the number of characters per line for the corresponding Bookmark control.
Public property Document Gets the Microsoft.Office.Interop.Word.Document associated with the Bookmark control.
Public property Duplicate Gets a read-only Range object that represents all the properties of the Bookmark control.
Public property Editors Gets an Editors object that represents all the users authorized to modify a Bookmark control within a document.
Public property EmphasisMark Gets or sets the emphasis mark for a character or designated character string within a Bookmark control.
Public property Empty Gets a value that indicates whether the Bookmark control is empty.
Public property End Gets or sets the ending character position of a Bookmark control.
Public property EndnoteOptions Gets an EndnoteOptions object that represents the endnotes in Bookmark control.
Public property Endnotes Gets an Endnotes collection that represents all the endnotes in a Bookmark control.
Public property EnhMetaFileBits Gets a picture representation of how the range of the Bookmark control appears.
Public property Fields Gets a read-only Fields collection that represents all the fields in the Bookmark control.
Public property Find Gets a Find object that contains the criteria for a find operation within a Bookmark control.
Public property FitTextWidth Gets or sets the width (in the current measurement units) in which Microsoft Office Word fits the text in the Bookmark control.
Public property Font Gets or sets a Font object that represents the character formatting of the text assigned to a Bookmark control.
Public property FootnoteOptions Gets a FootnoteOptions object that represents the footnotes in a Bookmark control.
Public property Footnotes Gets a Footnotes collection that represents all the footnotes in a Bookmark control.
Public property FormattedText Gets or sets a Range object that includes the formatted text in the Bookmark control.
Public property FormFields Gets a FormFields collection that represents all the form fields in the Bookmark control.
Public property Frames Gets a Frames collection that represents all the frames in a Bookmark control.
Public property GrammarChecked Gets or sets a value that indicates whether a grammar check has been run on the Bookmark control.
Public property GrammaticalErrors Gets a ProofreadingErrors collection that represents the sentences that failed the grammar check on the Bookmark control.
Public property HighlightColorIndex Gets or sets the highlight color for the Bookmark control.
Public property HorizontalInVertical Gets or sets the formatting for horizontal text set within vertical text in the Bookmark control.
Public property HTMLDivisions Gets an HTMLDivisions object that represents an HTML division in a Web document.
Public property Hyperlinks Gets a Hyperlinks collection that represents all the hyperlinks in the Bookmark control.
Public property ID Gets or sets the identifying label for the Bookmark control when the current document is saved as a Web page.
Public property Information Gets information about the Bookmark control.
Public property InlineShapes Gets an InlineShapes collection that represents all the InlineShape objects in a Bookmark control.
Public property InnerObject Gets the underlying Microsoft.Office.Interop.Word.Bookmark object of the Microsoft.Office.Tools.Word.Bookmark control.
Public property IsEndOfRowMark Gets a value that indicates whether the Bookmark control is collapsed and is located at the end-of-row mark in a table.
Public property Italic Gets or sets a value indicating whether the text in a Bookmark control is formatted as italic.
Public property ItalicBi Gets or sets a value that indicates whether the text in the Bookmark control is formatted as italic.
Public property Kana Gets or sets a value that indicates whether the specified range of Japanese language text in a Bookmark control is hiragana or katakana.
Public property LanguageDetected Gets or sets a value that indicates whether Microsoft Office Word has detected the language of the text in the Bookmark control.
Public property LanguageID Gets or sets the language for the Bookmark control.
Public property LanguageIDFarEast Gets or sets an East Asian language for the Bookmark control.
Public property LanguageIDOther Gets or sets the language for the Bookmark control.
Public property ListFormat Gets a ListFormat object that represents all the list formatting characteristics of a Bookmark control.
Public property ListParagraphs Gets a ListParagraphs collection that represents all the numbered paragraphs in the Bookmark control.
Public property ListStyle Gets the style that is used to format a bulleted list or numbered list in the Bookmark.
Public property Locks Gets the co-authoring locks in the Bookmark. This property can be used only in Word 2010 projects.
Public property Name Gets the name of the Bookmark control.
Public property NextStoryRange Gets a Range object that refers to the next story, as shown in the following table.
Public property NoProofing Gets or set a value that indicates whether the spelling and grammar checker ignores the text in the Bookmark control.
Public property OMaths Gets the equations that are contained in the Bookmark.
Public property Orientation Gets or sets the orientation of text in a Bookmark control when the Text Direction feature is enabled.
Public property PageSetup Gets or sets the Microsoft.Office.Interop.Word.PageSetup that is associated with the range of the Bookmark control.
Public property ParagraphFormat Gets or sets a Microsoft.Office.Interop.Word.ParagraphFormat object that represents the paragraph settings for the Bookmark control.
Public property Paragraphs Gets a Microsoft.Office.Interop.Word.Paragraphs collection that represents all the paragraphs in the Bookmark control.
Public property ParagraphStyle Gets the style that is used to format paragraphs in the Bookmark.
Public property Parent Gets the parent object of the Bookmark control.
Public property ParentContentControl Gets the parent content control for the Bookmark.
Public property PreviousBookmarkID Gets a value that represents the number of the last bookmark that starts before or at the same place as the Bookmark control.
Public property Range Gets a Range object that represents the portion of a document that is contained in the Bookmark control.
Public property ReadabilityStatistics Gets a ReadabilityStatistics collection that represents the readability statistics for the Bookmark control.
Public property Revisions Gets a Revisions collection that represents the tracked changes in the Bookmark control.
Public property Rows Gets a Rows collection that represents all the table rows in a Bookmark control.
Public property Scripts Gets a Scripts collection that represents the collection of HTML scripts in the Bookmark control.
Public property Sections Gets a Sections collection that represents the sections in the Bookmark control.
Public property Sentences Gets a Sentences collection that represents all the sentences in the Bookmark control.
Public property Shading Gets a Shading object that refers to the shading formatting for the Bookmark control.
Public property ShapeRange Gets a ShapeRange collection that represents all the Shape objects in the Bookmark control.
Public property 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.
Public property Site Gets or sets the ISite associated with the IComponent. (Inherited from IComponent.)
Public property SmartTags Gets a SmartTags object that represents a smart tag in a Bookmark control.
Public property SpellingChecked Gets or sets a value that indicates whether spelling has been checked throughout the Bookmark control.
Public property SpellingErrors Gets a ProofreadingErrors collection that represents the words identified as spelling errors in the Bookmark control.
Public property Start Gets or sets the starting character position of a Bookmark control.
Public property StoryLength Gets the number of characters in the story that contains the Bookmark control.
Public property StoryType Gets the story type for the Bookmark control.
Public property Style Gets or sets the style for the Bookmark control.
Public property 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.
Public property Tables Gets a Tables collection that represents all the tables in the Bookmark control.
Public property TableStyle Gets the style that is used to format tables in the Bookmark.
Public property Tag Infrastructure.
Public property Text Gets or sets the text in the Bookmark control.
Public property TextRetrievalMode Gets or sets a TextRetrievalMode object that controls how text is retrieved from the Bookmark control.
Public property TopLevelTables Gets a Tables collection that represents the tables at the outermost nesting level in the range of the Bookmark control.
Public property 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.
Public property Underline Gets or sets the type of underline applied to the text of the Bookmark control.
Public property Updates Gets all the available co-authoring updates in the Bookmark. This property can be used only in Word 2010 projects.
Public property WordOpenXML Gets the contents of the Bookmark in the Word Open XML format.
Public property Words Gets a Words collection that represents all the words in a Bookmark control.
Public property XML Gets the XML text in the Bookmark control.
Public property 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.
Public property XMLParentNode Gets an Microsoft.Office.Interop.Word.XMLNode object that represents the parent node of a Bookmark control.

Top

Methods

  Name Description
Public method AutoFormat Automatically formats a Bookmark control.
Public method BeginInit Signals the object that initialization is starting. (Inherited from ISupportInitialize.)
Public method Calculate Calculates a mathematical expression within a Bookmark control.
Public method CheckGrammar Begins a spelling and grammar check for the Bookmark control.
Public method CheckSpelling Begins a spelling check for the document from the start of the Bookmark control to the end of the document.
Public method CheckSynonyms Displays the Thesaurus dialog box, which lists alternative word choices, or synonyms, for the text in the Bookmark control.
Public method Collapse Collapses a Bookmark control to the starting or ending position.
Public method ComputeStatistics Gets a statistic based on the contents of the Bookmark control.
Public method ConvertHangulAndHanja Converts the Bookmark control text from Hangul to Hanja or vice versa.
Public method ConvertToTable Converts text within a Bookmark control to a table.
Public method ConvertToTableOld Infrastructure.
Public method Copy() Creates a new Microsoft.Office.Interop.Word.Bookmark in the same location as the existing Microsoft.Office.Tools.Word.Bookmark control.
Public method Copy(String) Creates a new Microsoft.Office.Interop.Word.Bookmark with the specified Name argument in the same location as the existing Microsoft.Office.Tools.Word.Bookmark control.
Public method CopyAsPicture The CopyAsPicture method copies the contents of the Bookmark control to the Clipboard.
Public method CreatePublisher Infrastructure.
Public method Cut Removes the contents of the Bookmark control from the document and places it in the Clipboard.
Public method Delete Deletes a dynamically created Bookmark from the document and removes it from the ControlCollection.
Public method DetectLanguage Analyzes the text of the Bookmark control to determine the language that it is written in.
Public method Dispose Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
Public method EndInit Signals the object that initialization is complete. (Inherited from ISupportInitialize.)
Public method EndOf Moves or extends the ending character position of a Bookmark control to the end of the nearest text unit.
Public method Expand Expands the Bookmark control.
Public method ExportAsFixedFormat Saves the Bookmark in PDF or XPS format.
Public method ExportFragment Exports the Bookmark to a document for use as a document fragment.
Public method get_Information Infrastructure. Use the Information property instead of this method.
Public method get_XML Infrastructure. Use the XML property instead of this method.
Public method GetSpellingSuggestions Gets a SpellingSuggestions collection that represents the words suggested as spelling replacements for the first word in the Bookmark control.
Public method GoTo Gets a Range object that represents the start position of an item within the Bookmark control.
Public method GoToEditableRange Gets a Range object that represents an area of a Bookmark control that can be modified by the user or group of users.
Public method GoToNext 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.
Public method GoToPrevious 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.
Public method ImportFragment Imports a document fragment into the Bookmark.
Public method InRange Determines if the Range to which the method is applied is contained in the Bookmark control.
Public method InsertAfter Inserts the specified text at the end of a Bookmark control.
Public method InsertAlignmentTab Inserts an absolute tab in the Bookmark that is always positioned in the same spot, relative to either the margins or indents.
Public method InsertAutoText Attempts to match the text in the Bookmark control with an existing AutoText entry name.
Public method InsertBefore Inserts the specified text before the Bookmark control.
Public method InsertBreak Inserts a page, column, or section break into the Bookmark control.
Public method InsertCaption Inserts a caption immediately preceding or following the Bookmark control.
Public method InsertCaptionXP Infrastructure.
Public method InsertCrossReference 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.
Public method InsertCrossReference_2002 Infrastructure.
Public method InsertDatabase 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.
Public method InsertDateTime Inserts the current date or time, or both, either as text or as a TIME field in the Bookmark control.
Public method InsertDateTimeOld Infrastructure.
Public method InsertFile Inserts all or part of the specified file into the Bookmark control.
Public method InsertParagraph Replaces the Bookmark control with a new paragraph.
Public method InsertParagraphAfter Inserts a paragraph mark after a Bookmark control.
Public method InsertParagraphBefore Inserts a new paragraph before the Bookmark control.
Public method InsertSymbol Inserts a symbol in place of the Bookmark control.
Public method InsertXML Inserts the specified XML text into the Bookmark control.
Public method InStory Determines if the Bookmark control to which this method is applied is in the same story as the range specified by the Range argument.
Public method IsEqual Determines if the Bookmark control to which this method is applied is equal to the range specified by the Range argument.
Public method 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.
Public method ModifyEnclosure Adds, modifies, or removes an enclosure around the specified character or characters in the Bookmark control.
Public method Move Infrastructure.
Public method MoveEnd Moves the ending character position of a Bookmark control.
Public method MoveEndUntil Moves the end position of the Bookmark control until any of the specified characters are found in the document.
Public method MoveEndWhile Moves the ending character position of a Bookmark control while any of the specified characters are found in the document.
Public method MoveStart Moves the start position of the Bookmark control.
Public method MoveStartUntil Moves the start position of the Bookmark control until one of the specified characters is found in the document.
Public method MoveStartWhile Moves the start position of the Bookmark control while any of the specified characters are found in the document.
Public method MoveUntil Moves the Bookmark control until one of the specified characters is found in the document.
Public method MoveWhile Moves the Bookmark control while any of the specified characters are found in the document.
Public method Next Gets a Range object that represents the specified unit relative to the Bookmark control.
Public method Paste Inserts the contents of the Clipboard into the Bookmark control.
Public method PasteAndFormat Pastes the selected table cells into the Bookmark control and formats them as specified.
Public method PasteAppendTable Merges pasted cells into an existing table in a Bookmark control by inserting the pasted rows between the selected rows.
Public method PasteAsNestedTable Pastes a cell or group of cells as a nested table into the Bookmark control.
Public method PasteExcelTable Pastes and formats a Microsoft Office Excel table into the Bookmark control.
Public method PasteSpecial Inserts the contents of the Clipboard into the Bookmark control.
Public method PhoneticGuide Adds phonetic guides to the Bookmark control.
Public method Previous Gets a Range object relative to the Bookmark control.
Public method Relocate In outline view, moves the paragraphs within the Bookmark control after the next visible paragraph or before the previous visible paragraph.
Public method Select Selects the Bookmark control.
Public method SetListLevel Sets the list level for one or more items in a numbered list in the Bookmark.
Public method SetRange Sets the starting and ending character positions for the Bookmark control.
Public method Sort Sorts the paragraphs in the Bookmark control.
Public method SortAscending Sorts paragraphs or table rows in ascending alphanumeric order within a Bookmark control.
Public method SortDescending Sorts paragraphs or table rows in descending alphanumeric order within a Bookmark control.
Public method SortOld Infrastructure.
Public method StartOf Moves or extends the start position of the Bookmark control to the beginning of the nearest specified text unit.
Public method SubscribeTo Infrastructure.
Public method TCSCConverter Converts the specified range of a Bookmark control from Traditional Chinese to Simplified Chinese or vice versa.
Public method WholeStory Expands a Bookmark control to include the entire story.

Top

Events

  Name Description
Public event BeforeDoubleClick Occurs when a Bookmark control is double-clicked, before the default double-click action.
Public event BeforeRightClick Occurs when a Bookmark control is right-clicked, before the default right-click action.
Public event BindingContextChanged Occurs when the value of the BindingContext property of the Bookmark changes.
Public event Deselected Occurs when selection moves from the Bookmark control to an area outside of the Bookmark control.
Public event Disposed Represents the method that handles the Disposed event of a component. (Inherited from IComponent.)
Public event Selected Occurs when the Bookmark control is selected.
Public event SelectionChange Occurs when the selection inside the Bookmark control changes.

Top

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. 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: https://go.microsoft.com/fwlink/?LinkId=160658.

See Also

Reference

Microsoft.Office.Tools.Word Namespace