I can't figure out how I can change the font style/color of a specific bookmark. Every time I try something, I keep getting the null exception error and and I can't figure out where I'm going wrong in referencing the bookmark itself.

Here's what I've got so far in creating the bookmark:

oWord = CreateObject("Word.Application")
        oWord.Visible = True
        oDoc = oWord.Documents.Add("path and location of Template.dotx")

        oDoc.Bookmarks.Item("Bookmark1").Range.Text = Textbox1.Text
        'I keep thinking something like this next line will work, but to no avail
        oDoc.Bookmarks.Item("Bookmark1").Range.Font.color = Word.WdColor.wdColorAqua

Here is a good starting point.

This was pulled directly from that page:

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.