Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    On focus ... (WinXP/Word2003)

    I have quite a few templates that have guidance notes linked to them - Word documents that the template throws up a question, "do you want to see the guidance notes? Y/N", and if yes it opens the appropriate doc.

    The problem is that I have a userform set to show while the document created by the template is open, but if the guidance notes are viewed and closed, when the template's document becomes the activedocument again the userform is no longer visible.

    Is there a command that does something like "when thisdocument becomes activedocument, userform.show"?

    Many thanks
    Beryl M


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

    Re: On focus ... (WinXP/Word2003)

    It might be possible to do so by creating an application-level event handler for the DocumentChange event of the Application object. But if I were you, I wouldn't attempt it - in my experience, it has a negative impact on Word's stability. I fear you're making things too complicated with modeless dialogs, guidance documents etc.

    If you're still interested, look up "Use events with the Application object" in the Word VBA help. Also see <post:=203,498>post 203,498</post:>.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: On focus ... (WinXP/Word2003)

    Thanks, Hans, but it ain't me that's setting things up this way - I've inherited them, and since I am a mere contractor here I'm not in a position to make major changes!

    I've been trying it out myself and the print box doesn't disappear when I do it so I'm going to talk to the user and see if he's doing something weird!

    Ta ever so
    Beryl M


Posting Permissions

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