Hi gmaijor
You gave me 2 Macros which I m using now.
1. set reminders using Minutes
Sub Add10Minutes() 'ruft Sub SetReminder(dHours As Double, Optional bMin As Boolean, Optional lngDue As Long = 0)auf
SetReminder 10, True, 0
End Sub
Sub Add60Minutes() 'ruft Sub SetReminder(dHours As Double, Optional bMin As Boolean, Optional lngDue As Long = 0)auf
SetReminder 60, True, 0
End Sub
Public Sub SetReminder(dHours As Double, Optional bMin As Boolean, Optional lngDue As Long = 0)
'Set lngDue as follows from the calling macro. The default is 0
'0 = olMarkToday
'1 = olMarkTomorrow
'2 = olMarkThisWeek
Dim olItem As Object
Dim dTime As Date
Select Case TypeName(Application.ActiveWindow)
Case "Explorer"
Set olItem = ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set olItem = ActiveInspector.CurrentItem
End Select
If TypeName(olItem) = "ContactItem" Then
dTime = CDate(Now)
If bMin = True Then
dTime = DateAdd("n", dHours, dTime)
Else
dTime = DateAdd("h", dHours, dTime)
End If
With olItem
.MarkAsTask lngDue
.ReminderSet = True
.ReminderTime = dTime
.Save
End With
End If
Set olItem = Nothing
End Sub
and
2. set reminder using Days
Sub Heute14()
SetReminderTomorrowOrNextDay 0, True
End Sub
Sub Morgen09()
SetReminderTomorrowOrNextDay 1, False
End Sub
Sub Morgen14()
SetReminderTomorrowOrNextDay 1, True
End Sub
Sub in2Tag09()
SetReminderTomorrowOrNextDay 2, False
End Sub
Sub in2Tag14()
SetReminderTomorrowOrNextDay 2, True
End Sub
Sub in3Tag09()
SetReminderTomorrowOrNextDay 3, False
End Sub
Sub in3Tag14()
SetReminderTomorrowOrNextDay 3, True
End Sub
Sub in7Tag09()
SetReminderTomorrowOrNextDay 7, False
End Sub
Public Sub SetReminderTomorrowOrNextDay(iDays As Integer, _
bPM As Boolean)
'Set lngDue as follows from the calling macro. The default is 0
'0 = olMarkToday
'1 = olMarkTomorrow
'2 = olMarkThisWeek
Dim olItem As ContactItem
Dim dTime As Date
Select Case TypeName(Application.ActiveWindow)
Case "Explorer"
Set olItem = ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set olItem = ActiveInspector.CurrentItem
End Select
If TypeName(olItem) = "ContactItem" Then
dTime = CDate(Date + iDays)
If bPM = True Then
dTime = dTime & " 14:00:00"
Else
dTime = dTime & " 09:00:00"
End If
With olItem
If iDays = 1 Then
.MarkAsTask 1
Else
.MarkAsTask 2
End If
'.TaskStartDate = dTime
'.TaskDueDate = dTime
.ReminderSet = True
.ReminderTime = dTime
.Save
End With
End If
Set olItem = Nothing
End Sub
I found following problem when using it
in the reminder window of outlook the macro
with minutes also has
.TaskStartDate = dTime
.TaskDueDate = dTime
Reminder with starttime.jpg
This is not good for showing the reminder in Outlook reminder window.
My question would be if you could be so kind and remove
.TaskStartDate = dTime
.TaskDueDate = dTime
from all macros so that only reminder time is set
Reminder without starttime.jpg
I do not understand how to change the macro I tried
'.TaskStartDate = dTime
'.TaskDueDate = dTime
But when I click the 7 Days it has no effect
In the macro1 with minutes I have not found start and due date
Hope you can help me again.