Expand Minimize

Bookmark.Revisions Property

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

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

Revisions Revisions { get; }

Property Value

Type: Microsoft.Office.Interop.Word.Revisions
A Revisions collection that represents the tracked changes in the Bookmark control.

The following code example adds a Bookmark control with text to the first paragraph, turns on revision tracking, then revises the text. It then displays the number of revisions in a message box.

This example is for a document-level customization.

private void BookmarkRevisions()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "This is sample bookmark text.";
    this.TrackRevisions = true;
    bookmark1.Words[2].Text = "was ";

    MessageBox.Show("Total revisions in bookmark: " +
        bookmark1.Revisions.Count);
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft