Outlook prompting "File is open please make sure to save before sending" message on VBA Code. RRS feed

  • Question

  • I have some reports running using excel vba automation. I usually pulls data into excel and then processes it and lastly send the processed report into mails to recipients. I have everything scheduled using windows task scheduler. Now not always but sometimes I finds outlook stuck with mails in outbox displaying message the file is probably open and that I should save it before it can be sent as attachment. 

    Can someone with similar proficiency let me know what is going wrong here as no file is open at that time and the same report (xlsb) is not always showing the error. Its completely random. 

    Any way to suppress outlook messages/warnings/popups will also work. 

    Operating System - Windows 10

    Outlook Version - 365

    Tuesday, November 5, 2019 5:45 PM