Hello, I have the code below but since a few days the reuse of the group in parenthesis is misinterpreted in the ReplaceWith. For example if I have the following text “...Hello” I will get “...H ello”, with a space after the H instead of before.
If I go into word and do Ctrl+H, check wildcards and paste in search field “^0133([A-Za-zÀ-ÖØ-öø-ÿ0-9])” and replace field “... \1” I get the same error.
Has a parameter in my VBA changed or in Word these days? I've reinstalled Word365 twice, I've done the Office365 updates. It seems to me that this problem appeared after the last Windows 11 update.
Code:
Do
positionInitial = text.start
text.Find.ClearFormatting
text.Find.Replacement.ClearFormatting
text.Find.MatchWildcards = True
texte.Find.Execute findText:=“^0133([A-Za-zÀ-ÖØ-öø-ÿ0-9])”, ReplaceWith:=“... \1”, Replace:=2
Loop While texte.start <> positionInitial