A family of Microsoft word processing software products for creating web, email, and print documents.
Please note that our forum is a public platform, and we will modify your question to hide your personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.
Hello SteveD
I can see that you are having trouble with Word
To replace only text that is formatted as 12.5 pt, add the following line after .ClearFormatting:
.Font.Size = 12.5
You must also change .Format = False to .Format = True, so Word includes the font size in the search.
The relevant section should look like this:
With ActiveDocument.Content.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = findList(i)
.Font.Size = 12.5
.Replacement.Text = replaceList(i)
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
This should replace matching text in 12.5 pt only and leave the 10.5 pt version unchanged. I recommend testing it on a copy of the document first.
I hope this helps, have a nice day.