Create a Task by Draft-EMail > Task+Reminder not Working

HDWTIGER

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hi Outlook-Forums-Users,
i am searching for an Workaround to creating an task by email-item in Outlook (2010/2013) in draft-mode
befor sending! The .MarkAsTask option works after sending an email. I need a workaround to set a reminder for the sender and not for the recipients bevor sending.

Do this manually by menue of Outlook it works.

Have anybody an idea of an workaround?
Here is my samplecode...

Greetings from Germany :)

Public Sub SetTask()
Dim objOutApp As Outlook.Application
Dim objMail As Outlook.MailItem

Set objOutApp = GetObject(, "Outlook.Application")
Set objMail = objOutApp.ActiveInspector.CurrentItem

With objMail
.TaskDueDate = DateAdd("d", 5, Now)
.TaskStartDate = DateAdd("d", 5, Now)
.ReminderSet = True
.ReminderTime = #6/21/2014#
.Save
.Display
End With

Set objMail = Nothing
Set objOutApp = Nothing
End Sub
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
If you just need the reminder, ReminderSet and ReminderTime should do it. If you need an associated task item, call the procudure from the ItemAdd event of the SentItems folder.

BTW: By retrieving the Application object from GetObject, you could face security issues (blocked properties). If the code runs within Outlook, the Application object is already available, no need to create a variable for it.
 
Top