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.

Re: Macro in Word: Switching between two documents by Jezebel

Jezebel
Fri Sep 08 17:35:20 CDT 2006

And your question is ... ?



"skipy" <skipy@discussions.microsoft.com> wrote in message
news:0C2EA46D-072C-4BE1-A9F1-41AFBBA4AD24@microsoft.com...
> 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.



Re: Macro in Word: Switching between two documents by skipy

skipy
Mon Sep 11 11:50:03 CDT 2006

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.

"Jezebel" wrote:

> And your question is ... ?
>
>
>
> "skipy" <skipy@discussions.microsoft.com> wrote in message
> news:0C2EA46D-072C-4BE1-A9F1-41AFBBA4AD24@microsoft.com...
> > 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.
>
>
>

Re: Macro in Word: Switching between two documents by Jean-Guy

Jean-Guy
Mon Sep 11 14:45:15 CDT 2006

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
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org