View Single Post
  #3   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP
 
Posts: n/a
Default How to repeat a Macro multiple times?

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!