I have a document of 100 pages. i need to replace a lot of characters and words
For example ∂,∆, π, lee ≈ with 'de', 'trang', 'P', 'loo' accordingly.
_Word_DocFindReplace($oDoc, "∂", "de") can do ok, but replace single word and take too long time.
How i can i search multiple letters(or even words) and replace it?
Please help.
I found VBA code maybe do work, if could pls translate to autoit thanks.
Sub MultiReplace()
Dim StrFind As String, StrRepl As String
Dim i As Long
StrFind = "∂,∆,π,lee "
StrRepl = "de,trang,P,loo"
Set RngTxt = Selection.Range
For i = 0 To UBound(Split(StrFind, ","))
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = Split(StrFind, ",")(i)
.Replacement.Text = Split(StrRepl, ",")(i)
.Format = False
.MatchWholeWord = True
.MatchAllWordForms = False
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
Next i
End Sub