Many thanks, Vivka! A new problem: can you explain why the code here below doesn't work? I've tried two different (but equvalent) codes for Find, but nothing changes.
Code:
Sub InsertDiv()
With Options
.AutoFormatAsYouTypeReplaceQuotes = False
End With
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.ClearFormatting
.Text = "(</body>)" & Chr(13)
'.Text = "(" & Chr(60) & "/body" & Chr(62) & ")" & Chr(13)
.Replacement.Text = "\1" & "<div align=""center"">" & Chr(13) & "=========================================================================="
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
Execute Replace:=wdReplaceAll
'.Execute
End With
With Options
.AutoFormatAsYouTypeReplaceQuotes = True
End With
End Sub