Hello all,

I have a very simple code (below) that selects a range and send an email, the macros runs on Workbook_Open. If I just open the workbook myself, everything is working as expected (regardless of whether I have Outlook open or not). However, if I schedule the same spreadsheet to be open from Task Scheduler, it only works if I have Outlook closed. If the Outlook is open at that moment, I get "Method EnvelopeVisible of object '_workbook' failed". I tried various approaches and spend a day searching for a solution only, but nothing seems to help. I am running both 2010 Professional version of both Excel and Outlook. Again to summarize, when Outlook is open, the code only works when I run the spreadsheet, not when it is run from Task Manager (this task runs under my name with highest privileges).

Thank you very much in advance for your help.

-Konstantin

Please Login or Register  to view this content.