I use MS Office 2013 and Windows 7 in a networked environment.
I have an auto-open Excel VBA program that sends files via Outlook and is scheduled via Task Scheduler.
This ran when I was on MS Office 2010, but my computer was wiped and reinstalled with MS 2013.
Some key points:
The Excel files all work when I run them directly and the emails get sent via Outlook.
Task Scheduler works when I use the setting "Run only when user is logged on" and emails get sent via Outlook.
Task Scheduler works with the other parts of the Excel VBA when it runs as "Run whether user is logged on or not," but does not successfully send Outlook files. I know this because I included a line to save a file in a particular directory and it did save it there. I also saw Excel in the Task Manager processes. So it runs, but does not send the Outlook email.
Things I have tried already:
- Changed DCOM settings for Microsoft Excel and Outlook Message Attachment
- Created "C:\Windows\System32\config\systemprofile\Desktop" and "C:\Windows\SysWOW64\config\systemprofile\Desktop" directories
MsgBox "Works"instruction in your auto-open macro. Run scheduled task - if no msgbox pops up, you know the macro isn't running. So, make sure macro security allows that macro to run, and/or put the workbook in a trusted location. - Mathieu Guindon