Share via


Bookmark.Revisions Property (2007 System)

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

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Revisions As Revisions
'Usage
Dim instance As Bookmark 
Dim value As Revisions 

value = instance.Revisions
[BrowsableAttribute(false)]
public Revisions Revisions { get; }
[BrowsableAttribute(false)]
public:
property Revisions^ Revisions {
    Revisions^ get ();
}
public function get Revisions () : Revisions

Property Value

Type: Revisions
A Revisions collection that represents the tracked changes in the Bookmark control.

Examples

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 Sub BookmarkRevisions()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")

    Bookmark1.Text = "This is sample bookmark text." 
    Me.TrackRevisions = True
    Bookmark1.Words(2).Text = "was "

    MessageBox.Show("Total revisions in bookmark: " & _
        Bookmark1.Revisions.Count.ToString)

End Sub
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);
}

.NET Framework Security

See Also

Reference

Bookmark Class

Bookmark Members

Microsoft.Office.Tools.Word Namespace