Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
I get a document from a client for publishing every month that's often 30+
pages long, and includes two tabbed columns (a dollar amount field and and a date field) for a long list of donations that I have to globally delete. I've created a macro that searches for a TAB then goes to the end of the line and DELETES everything selected. Beautiful. How, though, do I instruct Word to now perform that Macro seven or eight HUNDRED times so that it captures and deletes ALL such instances? I used to use a word processor (no longer supported) that you could instruct to perform a macro (or any operation) a certain number of times; I'd enter 700, hit the keystroke for the macro, and away it would go, performing the macro 700 times. There does not seem to be such an option in Word. I'm using Word for Mac 11.2, but the concept should apply to any recent version of Word. Can you help? THANK YOU! |
#2
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
You should be able to add something like:
Dim strCount As String Dim lngCount As Long Dim lngCycle As Long strCount = InputBox("How many times to repeat?") lngCount = strCount For lngCycle = 1 To lngCount ' Your Code Here Next lngCycle HTH Ed "Jeff Mills" wrote in message ... I get a document from a client for publishing every month that's often 30+ pages long, and includes two tabbed columns (a dollar amount field and and a date field) for a long list of donations that I have to globally delete. I've created a macro that searches for a TAB then goes to the end of the line and DELETES everything selected. Beautiful. How, though, do I instruct Word to now perform that Macro seven or eight HUNDRED times so that it captures and deletes ALL such instances? I used to use a word processor (no longer supported) that you could instruct to perform a macro (or any operation) a certain number of times; I'd enter 700, hit the keystroke for the macro, and away it would go, performing the macro 700 times. There does not seem to be such an option in Word. I'm using Word for Mac 11.2, but the concept should apply to any recent version of Word. Can you help? THANK YOU! |
#3
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
The following will probably do what you want:
Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:="^t", MatchWildcards:=False, Wrap:=wdFindContinue, Forward:=True) = True Selection.Paragraphs(1).Range.Delete Loop End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Jeff Mills" wrote in message ... I get a document from a client for publishing every month that's often 30+ pages long, and includes two tabbed columns (a dollar amount field and and a date field) for a long list of donations that I have to globally delete. I've created a macro that searches for a TAB then goes to the end of the line and DELETES everything selected. Beautiful. How, though, do I instruct Word to now perform that Macro seven or eight HUNDRED times so that it captures and deletes ALL such instances? I used to use a word processor (no longer supported) that you could instruct to perform a macro (or any operation) a certain number of times; I'd enter 700, hit the keystroke for the macro, and away it would go, performing the macro 700 times. There does not seem to be such an option in Word. I'm using Word for Mac 11.2, but the concept should apply to any recent version of Word. Can you help? THANK YOU! |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I tell a macro how many times to repeat | Microsoft Word Help | |||
Suppressing AutoClose Macro when Creating TOC Spanning Multiple Do | Tables | |||
Inputting the same values multiple times in a document... | Microsoft Word Help | |||
how do you make a macro execute x number of times? | Microsoft Word Help | |||
Want to Repeat Records certain number of times | Mailmerge |