Pausing a Macro for Input

  • Thread starter Thread starter mcp6453
  • Start date Start date
M

mcp6453

Is it possible with Word 2003 to create a macro that

1) prints text
2) pauses for text entered manually from the keyboard
3) prints more text after user presses Enter?

If so, what is the command?

Thanks.
 
Hi there,

Yes, but not in the way you describe it.

It is a lot easier to get user input first (Step 2 in your post) by using a
userform, and once you have the input, run the code to print all the text.
If you want user input based on that first part of the printed text (Step 1
in your post), then present that text as part of the userform. We do that
all the time and it is very stable and efficient.

See:
http://word.mvps.org/faqs/Userforms/index.htm

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
Yes, it is possible, but I doubt that anyone understanding how Word works
would do it that way. In Word, macros are not used to write boilerplate
text. That is about the most difficult way of doing it. The text in steps 1
& 3 would be stored in AutoText or in a template. If in AutoText, a macro
could be used to put it into the document. Step 2 would be handled with a
Fill-In field, an ASK field, or a UserForm. Or, 1-3 would be incorporated in
a template that is an "online-form."

There is no command to create such a macro, you would have to write it and
would probably use an input box for the purpose. An input box gets the text
into your macro, but not into the document.

I suspect that you would be happiest preparing a template as an online form.
You can find information on creating such forms in help.

Word and Word Perfect work very differently from one another. Each program's
methods have strengths and weaknesses; but, if you try to use one of these
programs as if it were the other, it is like pushing on a string! You can
easily make a lot of extra work for yourself. If you are unwilling to take
the time to learn to use Word's methods, you should stick to using Word Pad.
You'll have a lot less grief, although you'll miss out on a lot of raw
power.

See <URL: http://www.mvps.org/word/FAQs/General/WordVsWordPerfect.htm>
<URL: http://www.mvps.org/word/FAQs/General/TipsAndGotchas.htm>
<URL: http://www.mvps.org/word/FAQs/General/RevealCodes.htm>
<URL: http://www.mvps.org/word/FAQs/General/WordPerfectConverters.htm>
<URL:
http://businesssoft.about.com/compute/businesssoft/library/blconvert.htm>
for information on Word for Word Perfect users.

For more:
<URL: http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart2.htm>
<URL: http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart1.htm>
<URL: http://www.mvps.org/word/FAQs/Numbering/WordsNumberingExplained.htm>
<URL: http://www.addbalance.com/usersguide/styles.htm>
<URL: http://www.mvps.org/word/FAQs/Customization/WhatTemplatesStore.htm>

In Word 2000 (or later) You can get the function keys to display in a
special toolbar at the bottom of the screen if you want (something like
pressing F3 twice in WP). The following macro will do this.
Sub ShowMeFunctionKeys()
Commandbars("Function Key Display").Visible = True
End Sub

Learn about Styles - really learn! I resisted for years and now regret every
day of those years because although that string was still very hard to push,
it kept getting longer and longer, and had some very important projects tied
to it!


--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Back
Top