Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Macro Pause (Word 2003)

    How do I have the macro just pause until the enter key is pressed?

    Thanks,

    Jeanie

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Macro Pause (Word 2003)

    What do you want to accomplish with that?

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Macro Pause (Word 2003)

    I have a document log automatically generated when the user runs a macro. I want the macro to simply pause in that open log document with the cursor just after where the new information has been inserted so the user can verify the correctness and make any edits necessary, then press enter and the macro will continue which just closes and saves the document. I can always do it with another macro on a hot key, but just wondered if I could just do it in the same macro.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Macro Pause (Word 2003)

    Macros in Word don't work that way, but you can simulate it: see WD2000: Simulating a Macro Pause in Visual Basic for Applications. I don't know if it's worth the trouble.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Macro Pause (Word 2003)

    Thank you, Hans, that is a brilliant workaround, but you are right, not worth the trouble for this application. I will just separate the macro into 2 pieces and assign the second half to a hotkey.

  6. #6
    Super Moderator
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,507
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: Macro Pause (Word 2003)

    How about something like this: write the macro in two 'parts', with a 'bifurcation' test: when the first part is done, 1. pop up a message stating 'please review the results and restart this macro when you are satisfied', and then 2. enter a placeholder in the Document's custom properties to indicate that part 1 is complete, and then 3. exit the sub. Then when the user restarts the macro, it first examines for the custom document property, and if found, it skips to the second part of the macro code.
    -John ... I float in liquid gardens
    [acronym title="Gday mate!"][/acronym] [acronym title="What up Dude?"][/acronym] UTC -7±DS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •