Hi again
Back to another problem.
You wrote:
It's working here. You probably don't want this line as it sets it to complete, but that isn't callusing an error:
.MarkAsTask olMarkComplete
You are right, I do not want to have it marked as complete, so I removed this line.
Code below
When I now run the macro without the line on a contact, where reminder was set before and the date is due (red in the view) it updates reminder time but still stays red in the view, although the reminder date is in the future.
When I open a contact where reminder was set before and the date is due (red in the view) and I delete the reminder as seen below
and afterwards run the macro, contact is correct NOT red with updated reminder in the future.
To save this step I think I should put the code for "deleting reminder (Kennzeichnung löschen" in the macro before setting the new reminder time.
I hope you can help me to get it finally running.
Thanks
Code:
Public Sub HeuteTest()
Dim objMsg As Object
' GetCurrent Item function is athttp://slipstick.me/e8mio
Set objMsg = GetCurrentItem()
With objMsg
' due this week flag
.MarkAsTask olMarkNoDate
'.MarkAsTask olMarkComplete
' sets a specific due date
'.TaskDueDate = Date + #12:31:00 PM#
'.FlagRequest = "Nachverfolgung"
' makes sure due date is none
.TaskDueDate = #1/1/4501#
.ReminderSet = True
.ReminderTime = Now() + 2 / 1440
.Save
End With
Set objMsg = Nothing
End Sub
Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
End Select
Set objApp = Nothing
End Function