Bookmark.StoryType Özellik

Tanım

Denetimin hikaye türünü alır Bookmark .

public Microsoft.Office.Interop.Word.WdStoryType StoryType { get; }

Özellik Değeri

WdStoryType

WdStoryTypeDeğerlerden biri.

Örnekler

Aşağıdaki kod örneği, Bookmark belgeye metin içeren bir denetim ekler ve yer işaretinin hikaye türünü bir ileti kutusunda görüntüler.

Bu örnek, belge düzeyinde özelleştirme içindir

private void BookmarkStoryType()
{
    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.";
    MessageBox.Show(bookmark1.StoryType.ToString());
}
Private Sub BookmarkStoryType()

    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."
    MessageBox.Show(Bookmark1.StoryType.ToString())

End Sub

Şunlara uygulanır