Hello every one,
I have a macro that used to work well. However, it seems to bug with my new Word 2010. Let me give a piece of the code:
Quote:
Application.ScreenUpdating = False
Dim strFind As String, strRep As String, a As Integer
strFind = strFind & "TEMISCAMINGUE,ABITIBI,PARENT - RESERVOIR GOUIN,MATAGAMI,WASKAGANISH"
strRep = strRep & "WBA,YVO,WPK,YNM,YKQ"
With ActiveDocument.Content.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
.Text = "^13"
.Replacement.Text = "^l"
.Execute Replace:=wdReplaceOne
.Text = "([^13]{2}[!^13]{1;})^13"
.Replacement.Text = "\1^l"
.Execute Replace:=wdReplaceAll
|
At the last line of the code, I receive the message "Error 5560". "text searched contains a criteria not valid"
Anybody has a clue?
Michael