Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Repeat a Macro
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? |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Repeat a Macro
Hi CJ,
This is easy to do by adding a loop to your code. -- Cheers macropod [MVP - Microsoft Word] "CJ" wrote in message ... 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? |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Repeat a Macro
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 "CJ" wrote: 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? |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Repeat a Macro
On Oct 23, 2:13*am, Brian wrote:
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 "CJ" wrote: 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?- Hide quoted text - - Show quoted text - Didn't know about the loop. Thank you. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i get a macro to repeat itself | Microsoft Word Help | |||
Simple Macro Repeat | Microsoft Word Help | |||
how do I tell a macro how many times to repeat | Microsoft Word Help | |||
Repeat a macro? | Microsoft Word Help | |||
Repeat macro until end of document | Microsoft Word Help |