Pause a Macro

T

TedMi

Please be more specific. Where are you trying to use it? How does it not
work? Word version?
 
J

Jonathan West

Why doesn't the PAUSE work in MS Word?

elizabeth

Because you are running Word, not WordPerfect.

It's not that it doesn't work, it is just that Word works differently, and
there isn't a one-to-one feature equivalence for everything. What are you
trying to achieve?


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
L

lizaboop715

I want to have a macro that allows me to input text when I run it. I'm using
MS Word. When I have the macro recorder opened, PAUSE is an option. When I
run/play the macro, it doesn't stop for me to input text. Since it gives me
the option to PAUSE, it should pause.

From the posts that I have read, I am not the only one having this problem.
 
L

lizaboop715

Do you have the PAUSE option when you open the macro recorder? The PAUSE
option is not only on my home computer, it is on every version of MS Word
that I have used in the workplace. I want to record a macro, use the PAUSE
option to input text, close the recorder, run/play the macro and have the
macro pause so that I can input text. If the PAUSE feature doesn't work, why
is it an option on the recorder?

elizabeth
 
K

Karl E. Peterson

Do you have the PAUSE option when you open the macro recorder? The
PAUSE option is not only on my home computer, it is on every version
of MS Word that I have used in the workplace. I want to record a
macro, use the PAUSE option to input text, close the recorder,
run/play the macro and have the macro pause so that I can input text.
If the PAUSE feature doesn't work, why is it an option on the
recorder?

It works just fine, even according to your own description! It stops
recording the macro, you enter some text, press Record again, and the macro
recording resumes. What part of that do you consider to be "does not work"?

Seems to me, what's broken here is your own assumption about how a computer
program operates. Here's what you need to consider. If the Pause button
were to operate as you had assumed, how were you intending to indicate at
what point the macro exection should resume? I mean, after XX seconds? YY
keystrokes? It's a ludicrous notion.
 
L

lizaboop715

What is the purpose of the PAUSE option? When I run the macro, it does not
pause for me to insert text; the entire macro runs from beginning to end.
 
L

lizaboop715

I know very well what program I'm using.

Jonathan West said:
Because you are running Word, not WordPerfect.

It's not that it doesn't work, it is just that Word works differently, and
there isn't a one-to-one feature equivalence for everything. What are you
trying to achieve?


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
K

Karl E. Peterson

What is the purpose of the PAUSE option?

I honestly believe I just explained that to you. Did you read my initial
reply?

To try drilling this point through -- it *PAUSES* the macro recording
operation.

Perhaps I should put it this way? It pauses the macro *RECORDING*
operation!

Clearer yet?
When I run the macro, it does not pause for me to insert text;
the entire macro runs from beginning to end.

That would be correct, yes.
 
J

Jonathan West

I want to have a macro that allows me to input text when I run it. I'm
using
MS Word. When I have the macro recorder opened, PAUSE is an option. When
I
run/play the macro, it doesn't stop for me to input text. Since it gives
me
the option to PAUSE, it should pause.

From the posts that I have read, I am not the only one having this
problem.
On 8/10/2005 9:30 AM PST Sharon was also asking the same question.

The fact that you can pause the process of recording a macro doesn't mean
that a pause is put into the macro when it is executed.

if you want the macro to stop while you type something, you have two
possibilities.

1. Use 2 macros. Run the first one. Type something. Run the second one.

2. Use an InputBox (look it up in the VBA help). Type into the inputbox, and
have the macro put the text into the document wherever you want it to go.

Actually, there is a third more sophisticated option, to use a modeless
userform, but that takes more programming.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
L

lizaboop715

WHEN I RUN THE MACRO, WHY DOESN'T IT PAUSE FOR ME TO INPUT TEXT? MACROS ARE
SUPPOSED TO AUTOMATE TASKS, NOT MAKE THEM TAKE LONGER. I HAVE WORKED ON
DOCUMENTS IN MS WORD THAT WOULD HAVE TAKEN 2 OR 3 SECONDS IF THE MACRO WOULD
PAUSE FOR USER INPUT; INSTEAD IT'S QUICKER FOR ME TO KEEP RETYPING THE TEXT.
IT'S RIDICULOUS. IT'S SO TIME CONSUMING. PLEASE DON'T ADVISE ME TO USE THE
ONLINE FORMS; I'M BETTER OFF TYPING AND RETYPING AND RETYPING AND RETYPING.
 
K

Karl E. Peterson

WHEN I RUN THE MACRO, WHY DOESN'T IT PAUSE FOR ME TO INPUT TEXT?

Tsk, no need to yell. :)

You're confusing numerous issues here. To be as concise as possible, it
doesn't stop because you didn't *code* it to stop. Macros only do what you
tell them to do. Have you ever looked at the results of your macro
recording sessions? Do you understand what each line of code in there is
doing?
MACROS ARE SUPPOSED TO AUTOMATE TASKS, NOT MAKE THEM TAKE LONGER. I
HAVE WORKED ON DOCUMENTS IN MS WORD THAT WOULD HAVE TAKEN 2 OR 3
SECONDS IF THE MACRO WOULD PAUSE FOR USER INPUT; INSTEAD IT'S QUICKER
FOR ME TO KEEP RETYPING THE TEXT. IT'S RIDICULOUS. IT'S SO TIME
CONSUMING. PLEASE DON'T ADVISE ME TO USE THE ONLINE FORMS; I'M
BETTER OFF TYPING AND RETYPING AND RETYPING AND RETYPING.

You may indeed be right.
 
L

lizaboop715

I am presently working at a job where I get at least 25 emails, each with an
attachment (each attachment is different) in MS Word, that I have to edit by
inserting various names and titles in certain places. I should be able to
create a macro to insert the name(s) and or title(s) by using user input.
That's what a macro is supposed to do--make the task quicker.
 
K

Karl E. Peterson

I am presently working at a job where I get at least 25 emails, each
with an attachment (each attachment is different) in MS Word, that I
have to edit by inserting various names and titles in certain places.
I should be able to create a macro to insert the name(s) and or
title(s) by using user input. That's what a macro is supposed to
do--make the task quicker.

Yep! Definitely.
 
L

lizaboop715

I REALLY need to create a macro that I a can run with user input. I am not
confusing any issues. Plain and simple--I REALLY need to create a macro that
I a can run with user input.
 
J

Jonathan West

I am presently working at a job where I get at least 25 emails, each with
an
attachment (each attachment is different) in MS Word, that I have to edit
by
inserting various names and titles in certain places. I should be able to
create a macro to insert the name(s) and or title(s) by using user input.
That's what a macro is supposed to do--make the task quicker.

To do that you are going to have to do a bit more than just use the
recorder. You are going to have to get your feet wet with a little bit of
programming.

Take a look at these two articles.

Getting To Grips With VBA Basics In 15 Minutes
http://www.word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm

Creating a macro with no programming experience using the recorder
http://www.word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm

When you are happy you understand those reasonably well, look up the
InputBox function in the VBA Help. This is what you can use to get the user
to type in information.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
K

Karl E. Peterson

I REALLY need to create a macro that I a can run with user input. I
am not confusing any issues. Plain and simple--I REALLY need to
create a macro that I a can run with user input.

As Jonathan so calmly pointed out, that goes far beyond the traditional
boundaries of a "macro recording." I'd add that, if the user in question is
actually you, and the input is invariate, you could hard code it directly
into the skeletal outline provided by the macro recorder.

Maybe it'd help if you viewed the recording mechanism more as a means to
discovery and not something that ultimately provides you a functionally
useful solution? By recording a series of actions, you are able to open the
IDE and see how a machine translates what you did into code that the machine
itself can subsequently understand. But *always* view it as the very
beginning, and never the end, in your pursuit of a solution.
 
S

Shauna Kelly

Hi Lizaboop715
I should be able to ... insert the name(s) and or title(s) by using user
input.

It's possible that you don't need a macro at all. You may be better with an
AutoText and an Fill-in field.

See the following for some info on this (if the link breaks in translation,
you'll have to glue it back together again):
http://groups.google.com.au/group/m...48e72?lnk=st&q=&rnum=3&hl=en#0a24bc07b1e48e72

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

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