I have been trying to create a command button on a form that sends a task in outlook to another colleague.
I have searched forums and have some code that works for the most part, the only part not working is setting the reminder.
I have attached the code and would like some feedback as to why the reminder is not being set. The importance and all other features are working fine.
I have tried changing the reminderset= True to False and also VbTrue, but to no avail
I have also removed the persons e-mail to protect the innocent
Dim NowDate As Date
Dim DateEnd As Date
Dim DateDif As Long
Dim Task As Object
Dim ToContact As Object
Set Task = Outlook.CreateItem(olTaskItem)
NowDate = Now()
DateEnd = enqclosingdate
If DateAdd("d", -1, DateEnd) >= 1 Then
DateEnd = DateAdd("d", -1, DateEnd)
Else
End If
Task.Subject = "You have been assigned task " & enquirynumber.Value
Task.Body = "Please look at this " & ProjectTitle.Value
Task.Assign
Set ToContact = Task.Recipients.Add(someone@email.com)
Task.DueDate = DateEnd
Task.Importance = (olImportanceHigh)
Task.ReminderSet = True
Task.Save
Task.Send
Thanks in advance
Richard
I have searched forums and have some code that works for the most part, the only part not working is setting the reminder.
I have attached the code and would like some feedback as to why the reminder is not being set. The importance and all other features are working fine.
I have tried changing the reminderset= True to False and also VbTrue, but to no avail
I have also removed the persons e-mail to protect the innocent
Dim NowDate As Date
Dim DateEnd As Date
Dim DateDif As Long
Dim Task As Object
Dim ToContact As Object
Set Task = Outlook.CreateItem(olTaskItem)
NowDate = Now()
DateEnd = enqclosingdate
If DateAdd("d", -1, DateEnd) >= 1 Then
DateEnd = DateAdd("d", -1, DateEnd)
Else
End If
Task.Subject = "You have been assigned task " & enquirynumber.Value
Task.Body = "Please look at this " & ProjectTitle.Value
Task.Assign
Set ToContact = Task.Recipients.Add(someone@email.com)
Task.DueDate = DateEnd
Task.Importance = (olImportanceHigh)
Task.ReminderSet = True
Task.Save
Task.Send
Thanks in advance
Richard