Bookmark.Font Özellik

Tanım

FontDenetime atanan metnin karakter biçimlendirmesini temsil eden bir nesne alır veya ayarlar Bookmark .

public Microsoft.Office.Interop.Word.Font Font { get; set; }

Özellik Değeri

Font

FontBir denetime atanan metnin karakter biçimlendirmesini temsil eden nesne Bookmark .

Örnekler

Aşağıdaki kod örneği, Bookmark ilk paragrafa metin içeren bir denetim ekler ve sonra yer işaretinin yazı tipi rengini mavi olarak değiştirir.

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

private void BookmarkFont()
{
    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.";
    bookmark1.Words[3].Font.Color = Word.WdColor.wdColorBlue;
}
Private Sub BookmarkFont()

    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."
    Bookmark1.Words(3).Font.Color = Word.WdColor.wdColorBlue

End Sub

Şunlara uygulanır