0

I have a sort of long document with all parentheses toward one side; like (out of stock(. Now I'm wondering how I can write a replace order replacing every other parenthesis.

I already know that the replace order is like:

Set myRange = ActiveDocument.Content myRange.Find.Execute FindText:="(", _ ReplaceWith:=")", Replace:=wdReplaceAll

but unfortunately I don't know how to apply

If i Mod 2 = 0 Then to the code above.

kasymax
  • 1
  • 1
  • I could fix the issue with the code [here](https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-write-a-replace-order-in-vba-working-every/cb92c14a-6876-4556-94ed-d7efb008a4df) – kasymax Jan 30 '23 at 09:47
  • You may run into issues with the every second method. If you do, I would look into regular expressions. [**REGEX**](https://stackoverflow.com/questions/4736/learning-regular-expressions) – Cameron Critchlow Jan 31 '23 at 23:34

0 Answers0