Home » excel » vba – Send an Email from Excel with Follow-Up Reminder

vba – Send an Email from Excel with Follow-Up Reminder

Posted by: admin May 14, 2020 Leave a comment

Questions:

I’ve a macro that replaces a manual process of copy/pasting data from a workbook into a new email and then sending that email to several dynamic recipients (based on the workbook data).

When done manually, the email is set to high importance (which I have replicated via VBA) and a follow-up reminder is set for the recipient, not the sender.

To be clear, the process does not involve sending a task or meeting with due dates and the like. A follow-up reminder is set to remind the recipient to take action on the email content a few hours before a due date that’s posted in the body of the email.

I came across this forum post: [http://www.pcreview.co.uk/forums/setting-reminder-flag-vba-e-mails-sent-users-t3966711.html][1].
Towards the bottom of the post, Sue Mosher suggests that this may not be possible via VBA considering the possible drawbacks.

Is there a way to set a follow-up reminder in a VBA-generated email?

How to&Answers:
Dim MyItem as Outlook.MailItem

With MyItem
            .To = EmailAddr
            .Subject = sSubject
            .SentOnBehalfOfName = "[email protected]"
            .HTMLBody = Msg
            .Importance = olImportanceHigh
            .FlagStatus = olFlagMarked
            .FlagRequest = "Follow up"
            .FlagDueBy = Range("F2").Value & " 10:08 AM"
End With

The main parts being .FlagStatus, .FlagRequest, and .FlagDueBy. With .FlagDueBy, I used a dynamic date in my workbook to set the due date, but a hard due date could be coded like so, FlagDueBy = "1/1/1900 12:00 AM".