简体   繁体   中英

Send an Email from Excel with Follow-Up Reminder

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?

Dim MyItem as Outlook.MailItem

With MyItem
            .To = EmailAddr
            .Subject = sSubject
            .SentOnBehalfOfName = "SoAndSo@sample.com"
            .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" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM