Repeat a Macro

C

CJ

In Word 2003, I have set up a macro to find text in a table, split the
table above the found text, and then insert a page break. The table
is over 400 pages long (and the text I'm finding is on every page) and
I would like to be able to have the macro repeat as many times as the
text is found. Is this possible?
 
B

Brian

Not knowing your code I'll make assumptions.

After your "Selection.Find" line, add:

With Selection.Find
Do While Selection.Find.Execute
Your code........

Loop
End With
End Sub

Hope this helps,
 
C

CJ

Not knowing your code I'll make assumptions.

After your "Selection.Find" line, add:

With Selection.Find
Do While Selection.Find.Execute
Your code........

Loop
End With
End Sub

Hope this helps,

--
Brian McCaffery





- Show quoted text -

Didn't know about the loop. Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top