VBA to send Outlook email - stuck in Outbox
Hi. At work, employees have an individual report in a folder that they
are supposed to do each day. When they are done, there is a signoff
sheet in their workbook to which they are supposed to add their
initials. Obviously, that sometimes gets forgotten. So, my colleague
and I created a macro the loops through all of the workbooks in the
folder and looks at the sign off sheet. If the individual's initials
are not there, the macro sends the person an email. This works
absolutely fine if/when Outlook is open, but if Outlook happens to be
closed, the emails get stuck in the Outbox.
We searched the internet on this issue, and we found and implemented
Ron De Bruin's code to initiate Outlook and send the emails, but they
are still staying stuck in the Outbox until Outlook is opened and
either the files are released manually, or another email is sent that
pushes the others through.
We are using Outlook 2016, version 16.0.6741.2047. Does anyone have
any thoughts on how to push this through? As it stands right now, we
are going to set up a Windows task scheduler event to open Outlook to
ensure it's open. And yes, we think that will work, but we are hoping
to find the 'right' solution. Any thoughts? Thanks!
Frank
|