Macro in Word: Switching between two documents

S

skipy

Word 2003: I want to build a macro using my key board keys. (Alt/z).

I want to loop my macro with hitting the "Alt/z" keys once.

Taking text from document 1 -- I will tell me macro to look for a particular
character in document 1 and placing the text into document 2.

I'm looking for the macro to go throught the entire document until it reach
the end of the document.
 
S

skipy

I'm looking for the key stokes to tell the macros to "loop", "continue",
"start over" or "repeat". I want the marco to go throught the doucment
without hit "Alt/z again. Maybe I'm using the wrong term.
 
J

Jean-Guy Marcil

skipy was telling us:
skipy nous racontait que :
I'm looking for the key stokes to tell the macros to "loop",
"continue", "start over" or "repeat". I want the marco to go
throught the doucment without hit "Alt/z again. Maybe I'm using the
wrong term.

Wrap your code in a

Do Until (Some Condition)

Loop

or a

While (Some Condition)

Loop

construct.

The actual condition depends on how your code is written, i.e. Are you using
a Range object or the Selection object?

Look up "Do" and "While" in the VBE help.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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