Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2003
    Location
    Australian Capital Territory, Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autorecovery: getting VBA control ( word 2002)

    Here at Comcare, I have created a Standard Letters System. Our Java application, DOS Shells to run: "winword.exe myVBAmacro.dot /mMain". The Document name is passed via environment variables.
    Tools Option, Save autorecover = 5, in case a user looses their session on the Citrix terminal server.
    However, on returning to Word after failure, the first thing it does before running any VBA, is to start an autorecover session. It creates that pane on the LHS giving the recovery options. My VBA macro is then called and has no idea what is going on. If a recovery option is selected by the user, the VBA looses its context, ie. all the variable set on start up are wiped.
    Is there any way for the VBA to know a recovery session is in progress so at least it go back to sleep?
    Ideally VBA could pre-emptively do the recovery, so the user does not have call the help desk and ask what to do.
    Mmmm
    What to do? thanks AT

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Autorecovery: getting VBA control ( word 2002)

    I believe, though I'm not in the mood to crash my computer to test the theory, that you can query the ActiveWindow.Caption and for an autorecovered document the text (Recovered) should be found at the end. (It might be something else, but that's what I recall at the moment.) Does this let your macro handle the situation gracefully?

  3. #3
    New Lounger
    Join Date
    May 2003
    Location
    Australian Capital Territory, Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autorecovery: getting VBA control ( word 2002)

    Thanks for you comment. The caption did not help but it made think of this:
    Set mnuBar = ActiveDocument.CommandBars
    If mnuBar("Document Recovery").Visible Then etc
    During recovery, a menu bar is present, and this is easy to check for.
    BTW, I was just ending task and not rebooting each time!
    thank again.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Autorecovery: getting VBA control ( word 2002)

    Wow, I really do have a lot of changes to look forward to in Word 2002!!

Posting Permissions

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