set chck outbox before closing


  1. Posts : 68
    Windows 10
       #1

    set chck outbox before closing


    I sometimes click and shut outlook by mistake. I have put a dummy message in the outbox to allow me to avoid closing. I cannot find anywhere now to set outlook so that it checks the outbox before closing .

    Ideas welcome!

    thanks - winver 22H2
      My Computer


  2. Posts : 16,957
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #2

    Alan,

    I assume you are referring to MSOffice Outlook and not to the built-in email app or the online MSAccount/Outlook service.

    In the VBA module ThisOutlookSession, I have a script that interrupts Outlook closure.
    Code:
    Sub Application_Quit()
    MsgBox "I suggest you get this working and then we can discuss what else can be done."
    End Sub
    Try putting that in and testing that it appears during closure.

    The macro should run when you close Outlook for the first time since writing the script. For future use, you will need to enable this macro using whatever facilities are available in your version of MSOffice.
    I use MSOffice 2007 and it's really awkward about Outlook macros but I believe that the scheme for enabling specific ones in later versions is more straightforward.
    So look up enable macro or similar in Outlook help.

    I've also got some code that I wrote as an exercise several years ago that lists folder contents so that would probably form the basis of listing the Outbox contents.
    It would probably take me an hour to study what I wrote in order to understand it well enough to discuss it with you so please make sure that you get that simple MsgBox macro working first and then I'll figure out what to suggest.

    I am not sure about two things you wrote:
    1 I thought Outlook always brought up a dialog warning you if it found anything in the Outbox.***
    2 I don't understand what a dummy mail in the Outbox has to do with anything.
    2.1 Is your real aim just getting a chance to confirm Outlook closure & the dummy Outbox mail is just a method of forcing that?
    2.2 If so, then we could probably just work on a form of the MsgBox macro that would achieve that end. You can make MsgBoxes have, for example, OK/Cancel, Yes/No buttons so such a MsgBox would provide a method of confirming closure.


    *** MSOffice Outlook 2007 definitely still brings up a warning if the Outbox has mail that has yet to be sent.
    set chck outbox before closing-outlook-outbox-not-empty-warning.png

    It only does this if the Outbox contains an email for which you have clicked on Send.
    It does not do this if you have merely, for example, copied an email into that folder.
    Perhaps your dummy email is falling foul of this condition.


    All the best,
    Denis
      My Computer


  3. Posts : 16,957
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #3

    Oh dear. I cannot help after all
    I use that Application_Quit event to run batch files when Outlook closes.
    You want something that can stop Outlook closing. The Application_Quit() event cannot do that; Quit has already started and cannot be stopped.
    I've had a look around to see if there's an event before Application_Quit() that might suit your purposes but cannot find anything.

    Denis
      My Computer


  4. Posts : 68
    Windows 10
    Thread Starter
       #4

    Thanks for your posts Denis. I am not really into adding code but I can answer some of your queries about what I am doing.

    Yes, outlook does put up a window if there is an unsent email (MS Office 2019). The dummy email was just that: a subject and a made up email address in the outbox that was intended, when outlook closed, to prompt about unsent emails and so allow me to cancel the closure. This email I copied to the outbox and hoped! It did not work - perhaps because of the point you mention that the email needs to be 'sent' first.

    I am also going to try the 'delayed email' option in outlook.

    Thanks for your help

    Alan
      My Computer


  5. Posts : 16,957
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #5

    ALANGR said:
    I am also going to try the 'delayed email' option in outlook.
    Alan,

    Yes, that will do what you want.

    Denis
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:00.
Find Us




Windows 10 Forums