Bookmark.WholeStory Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Expands a Bookmark control to include the entire story.
public:
void WholeStory();
public void WholeStory ();
abstract member WholeStory : unit -> unit
Public Sub WholeStory ()
Examples
The following code example adds text to the document and then adds a Bookmark with text. Using the WholeStory method, it expands the bookmark to include the entire document.
This example is for a document-level customization.
private void BookmarkWholeStory()
{
this.Paragraphs[1].Range.InsertParagraphBefore();
this.Paragraphs[1].Range.InsertParagraphBefore();
this.Paragraphs[1].Range.Text = "This is the first paragraph.";
Microsoft.Office.Tools.Word.Bookmark bookmark1 =
this.Controls.AddBookmark(this.Paragraphs[2].Range,
"bookmark1");
bookmark1.Text = "This is sample bookmark text.";
bookmark1.WholeStory();
MessageBox.Show("bookmark1 starts at " + bookmark1.Start.ToString());
}
Private Sub BookmarkWholeStory()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Me.Paragraphs(1).Range.Text = "This is the first paragraph."
Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
Me.Controls.AddBookmark(Me.Paragraphs(2).Range, "Bookmark1")
Bookmark1.Text = "This is sample bookmark text."
Bookmark1.WholeStory()
MessageBox.Show("Bookmark1 starts at " & _
Bookmark1.Start.ToString)
End Sub