![]() |
#1
|
|||
|
|||
![]()
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. |
Tags |
if-statement, replace, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2003: VBA "Function" causes "#VALUE!" errors after running "insert/delete row" custom macro | Matt C | Excel Programming | 2 | 01-08-2022 06:03 AM |
"Find and Replace" tool leaves out many of the occurrences of what I put in the "find" window | Swarup | Word | 8 | 06-24-2021 08:31 PM |
Find and Replace "^&" no longer working | merryb | Word | 3 | 08-21-2018 04:01 AM |
Replace "comma" with "and" in line of text | audioman | Word VBA | 7 | 01-21-2016 03:11 PM |
![]() |
derelyth | Excel | 4 | 03-27-2011 04:31 PM |