Hi, I am wanting to do the following using a macro, but my knowledge of the WORD object model is a bit rusty…
I want to go through a document, and find every instance of a set of characters, a speechmark followed by a square bracket “[ .
Where the macro finds this, I need a carriage return at the begging of the line that these characters are found on, and also a carriage return in front of the characters themselves. Then I need the line above them to be made bold.
I have this so far which just does the first part.
Sub temp()
Dim strFind As String
strFind = Chr(34) & “[”
With ActiveDocument.Content.Find
Do While .Execute(FindText:=strFind, Forward:=True) = True
With .Parent
.StartOf Unit:=wdParagraph, Extend:=wdMove
.InsertAfter Chr(13)
.Move Unit:=wdParagraph, Count:=2
End With
Loop
End With
End Sub
Any thoughts of the quickest way of doing this? I remember coding in Word a few years ago, using the Find and Range objects, but I am struggling now!
Thanks