(Solved) – How to bold a specific string in a sentence?

(solved)-–-how-to-bold-a-specific-string-in-a-sentence?

I would like to bold the first string: myArray(c,3), but I don’t know how to do. It shouldn’t be difficult?

    For c = UBound(myArray) - LBound(myArray)   1 To 1 Step -1
        ActiveDocument.Bookmarks("xxx").Range.InsertAfter myArray(c, 3) & myArray(c, 6)
        If c <> 1 Then ActiveDocument.Bookmarks("xxx").Range.InsertAfter vbNewLine
    Next c

I tried various options with Range.Characters().Bold = True, but it seems I can use only this notation Characters(5) and not Characters (2,5) in spite of what I have seen online. In other words, I will have to loop for each characters if I want them bold.

Is there a simple way to do it? Or something more efficient?

Leave a Reply

Your email address will not be published. Required fields are marked *