MS Outlook VBA Script - Automatic Print ORIGINAL email when it gets undelivered

1

0

I'm using MS Office 2016 Desktop App on Windows 10 and looking for some functionality which I didn't find any success after searching online a lot and also contacted MS Outlook Support to only find that there is no easy way to achieve it except VBA script. Here's what I'm looking for:

We're sending individual mail to a huge bulk of people having individual information and individual attachment (I'm fine with this and have no problem because of other alternatives). However, what I want is that when the emails don't get sent successfully to few of them (because of the incorrect email provided or some other reason), I want to perform some action on the Original emails (ones which weren't delivered to the receiver instead of undeliverable mail from MS Outlook) when this happens. Possible action could be primarily printing the original mail and its attachments automatically to some other email automatically.

The reason I want this automation is that it is very difficult and burdensome to print individual emails from around 1000s of emails daily. Unfortunately, MS Outlook rules don't provide the condition for 'when email undelivered' or similar. I'm not sure if MS Outlook VBA script could help me for this case as I have no idea about VBA. I would like to know if this can be achieved with VBA script or not. Thank you in advance.

Dhruvil21_04

Posted 2019-01-22T18:02:53.027

Reputation: 111

Question was closed 2019-01-22T18:10:59.400

Welcome to Super User! Please note that https://superuser.com is not a free script/code writing service. If you tell us what you have tried so far (include the scripts/code you are already using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?.

– DavidPostill – 2019-01-22T18:11:17.163

I'm just curious to know if it's possible with VBA scripting or not? – Dhruvil21_04 – 2019-01-22T18:15:28.530

https://stackoverflow.com/a/38303646/4539709 – 0m3r – 2019-01-25T20:51:29.440

Sorry for not being clear. I guess your link solution is concerned more with sending part. But I'm more concerned about is the automation on email if not successfully delivered. Hope this makes sense. – Dhruvil21_04 – 2019-01-25T21:00:35.683

Do you get returned / undeliverable email? – 0m3r – 2019-01-25T21:18:16.587

Yes, I get undeliverable email for each of them. But, I'm not asking for any read receipts or something like that, just FYI. – Dhruvil21_04 – 2019-01-25T21:21:22.527

There is nothing built in, you'd have to write some code for that. Post at StackOverflow and I'll give you a few suggestions. – Dmitry Streblechenko – 2019-01-25T21:39:44.070

With outlook vba what you need to do is monitor your inbox for undeliverable emails then open your excel file and highlight the email address with red color or add column with note undeliverable, or the code can look for second email. – 0m3r – 2019-01-25T21:39:45.400

@DmitryStreblechenko Here is my SO link: https://stackoverflow.com/questions/54373252/ms-outlook-vba-script-automatic-print-original-email-when-it-gets-undelivered

– Dhruvil21_04 – 2019-01-25T21:50:48.803

See my reply there. – Dmitry Streblechenko – 2019-01-25T22:20:22.550

No answers