Consulting

Results 1 to 2 of 2

Thread: How to write a "replace" order in VBA working every other time

  1. #1
    VBAX Newbie
    Joined
    Jan 2023
    Posts
    1
    Location

    Question How to write a "replace" order in VBA working every other time

    I have a sort of long document with all parentheses toward one side; like (spring(, (fall(, (winter(.

    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.







  2. #2
    Answered at https://answers.microsoft.com/en-us/...d-d7efb008a4df
    Please cross post correctly!
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •