I have a large amount of word text with lines supposed to be Heading3 but are actually simple text that start with ***
Ex.
*** Day 1
Something happened on day 1... etc
*** Day 2
Something happened on day 2... etc
I am trying to select those lines, delete the 3 stars word, and make that line as heading3.
I am also avoiding (best practice?) the use of selection object in vba, and am focusing instead on the range.find method. I can easily find the *** word, but how to expand to the end of line? In fact the range.find does not have an expansion method. So I am resorting to the use of wildcards... and I am not successful.
For the moment I did not start the formatting process of the code, as I did not manage to pass the finding process.
Sub FindAndReplace3Stars()
Dim myStoryRange As Range
For Each myStoryRange In ActiveDocument.StoryRanges
With myStoryRange.Find
.Text = "<\*\*\*>*^13"
.Replacement.Text = "B"
.MatchWildcards = True
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
Next myStoryRange
End Sub