I am having trouble bolding part of a paragraph in MS WORD
.
I am building a document paragraph by paragraph. In only one of those I want to bold only one number. The number may occur more than once in the document but should be bolded only once, in this specific paragraph.
Example:
My first paragraph.
My second paragraph.
My number is 123.
I access paragraphs with the following code:
Dim paragraphN As Integer
paragraphN = 3
ActiveDocument.Sections(1).Range.Paragraphs(paragraphN).Range
I don`t know how to specify only a part of this specific paragraph. I tried:
ActiveDocument.Sections(1).Range.Paragraphs(paragraphN).Range(Start:=14, End:=17).Font.Bold = True
ActiveDocument.Sections(1).Range.Paragraphs(paragraphN).Range.Characters(Start:=14, End:=17).Font.Bold = True
ActiveDocument.Sections(1).Range.Paragraphs(paragraphN).Characters(Start:=14, End:=17).Range.Font.Bold = True
ActiveDocument.Sections(1).Range.Paragraphs(paragraphN).Characters.Range(Start:=14, End:=17).Font.Bold = True
ActiveDocument.Sections(1).Range.Paragraphs(paragraphN).Range(14,17).Font.Bold = True
All failed. The problem seems pretty straightforward but I am out of ideas...