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)
Syntax
'Declaration
ReadOnly Property Revisions As Revisions
Revisions Revisions { get; }
Property Value
Type: Microsoft.Office.Interop.Word.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.