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

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Outlook – Running Code on Exit (Outlook 2000 SR-1)

    Author
    Topic
    #378670

    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?

    Viewing 0 reply threads
    Author
    Replies
    • #627523

      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?

      • #627525

        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.

    Viewing 0 reply threads
    Reply To: Outlook – Running Code on Exit (Outlook 2000 SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: