PDA

View Full Version : Solved: Word macros that can pause for user input and then resume



Chukesgirl
05-05-2006, 11:47 AM
I work in the legal field and I have several Wordperfect macros that help assemble documents with repetitive language. Basically, the user will start off their document from a blank page and at some point, they run the macro from the macro menu and it puts a few lines of text into their document and then pauses and prompts the user to insert their own variable text. Then the macro resumes and puts in a few more lines of text, then stopping once more to prompt the user for more variable text and then lastly, it adds a few more lines of text then quits and the user continues typing his document. Is there a way to do something similar in Word :dunno and if so, can you give me a sample? Someone has suggested using a form, but I can't use a form because most of the text in the document is created by the user and it is always different.

Jacob Hilderbrand
05-05-2006, 12:53 PM
You can show a form that can be used to pause the macro until the user is done doing what they need to do, then the macro can continue.

Try the attachment.

Chukesgirl
05-05-2006, 02:25 PM
Thanks for the quick response, but what special secrets are hidden in the attachment? All I see is a blank read only document. Did I mention that I'm still trying to learn Visual Basic for Apps.

lucas
05-05-2006, 03:35 PM
On the main toolbar click on Tools-Macro-Macro's
Select Macro1 and then click the Run button.

to view the code use Alt-F11

Jacob Hilderbrand
05-05-2006, 03:37 PM
Yeah, sorry about that. Just run the macro and it will give you an example. Then if you need help with the specific code, we can help you further.

Chukesgirl
05-08-2006, 09:53 AM
Thank you and God bless you! This is EXACTLY what I wanted and the code doesn't look too complicated. I'm crying tears of joy right now!

geekgirlau
05-08-2006, 05:32 PM
Hi Chukesgirl,

I've marked this thread as "Solved" for you - when you have the answer to a question, go to "Thread Tools" at the top of the screen to do this.

GeekGirlau

PS Wow - WordPerfect ... brings back memories

Jacob Hilderbrand
05-08-2006, 06:46 PM
You're Welcome :beerchug:

Take Care

dewachter
07-14-2016, 02:26 PM
I recently began exploriong VBA for word documents and was looking for the same solution. Do you have a sample of a work macro that accomplishes this? Any help will be appreciated

Paul_Hossler
07-16-2016, 06:09 PM
I recently began exploriong VBA for word documents and was looking for the same solution. Do you have a sample of a work macro that accomplishes this? Any help will be appreciated

Since this was very old and marked [Solved], lot of times people won't read it,

It'd probably be better to start your own stand-alone question so that more people will read it and possible offer ideas

https://en.wiktionary.org/wiki/necropost