Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Slough, Berkshire, England
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Outlook - Running Code on Exit (Outlook 2000 SR-1)

    I want to run some code on exiting Outlook. The code checks to see if you have an Out of Office appointment later that day or on next working day and offers to set your Out of Office Assistant. The code works when I test it by running it directly.
    I put the code in Application_Quit, but by that time Outlook has lost any ability to read its own folders.
    How do I run code when I am shutting Outlook?

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook - Running Code on Exit (Outlook 2000 SR-1)

    As a workaround you might put your code in a normal module and include the Application.quit command in there (remove the Application_Quit sub first). Attach the code to a toolbar button and off you go?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Slough, Berkshire, England
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook - Running Code on Exit (Outlook 2000 SR-1)

    Thank you

    That works, although if anyone knows how to catch the actual exit event I would still be interested.
    OR
    Can I get this new procedure to be run if I select EXIT from the menu and/or close it with the cross at top right.

Posting Permissions

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