Hi Guys,
I really need some help here. My situation is that I need to use a computer which has Outlook 2016 with the 'Send immediately when connected' option unticked (so all emails go to the Outbox when they're initially sent) and I can't do anything about that.
I'm trying to write a really simple macro that performs the following steps:
1) Construct an email message from within Excel
2) Transfer the message from Excel to Outlook 2016 and 'send' it from the default email account
3) Move it from the Outbox to the Sent Items folder (i.e. properly sending it)
All of my somewhat limited VBA experience has been within the Excel application and I'm not really familiar with automation of other apps. I've borrowed code from other threads (many thanks!) and I've managed to complete steps 1 & 2 with no problems. However, I'm stuck on step 3.
I've obtained some code for this which I thought would work but it just doesn't seem to do anything at all. When I step through the code line by line, I don't get any error whatsoever but the email that was created and sent at steps 1 and 2 just remains stuck in the Outbox. The same is true whether Outlook is closed or running at the start of the macro.
Does anybody have any ideas as to where I'm going wrong? I'd really appreciate you taking a look - my code is as follows:
Bookmarks