W
WembleyBear
Hi again
I have some code which sets a task & reminder in Outlook, which works well
(thanks Chris!) . However, I can't seem to get the Reminder Date to set
correctly. What I want is for the Outlook Reminder Date to be set two days in
advance of the Due Date (which works fine), but it just sets to the same as
the Due Date which is not correct. Where am I going wrong? Fairly new to
coding, so be patient - I've posted my code below:
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Dim Subj As String
Dim Prob As String
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
Subj = "Helpdesk Call Reminder - Call Ref: TE(" & Me.Call_Ref & ")" &
vbCrLf & "User: " & Me.UserName & vbCrLf & "Problem Summary: " &
Me.Problem_Summary
Prob = Me.Problem_History
With OutlookTask
.Subject = Subj
.Body = Prob
.ReminderSet = True
.ReminderTime = DateAdd("d", -2, Me.Target_Date)
.DueDate = DateAdd("d", 0, Me.Target_Date)
.ReminderPlaySound = False
.ReminderSoundFile = "C:\Windows\Media\Ding.wav"
.Save
End With
Many thanks in advance
Martyn
Access 2000
Outlook 2000
Windows 2003 server over Citrix PS
I have some code which sets a task & reminder in Outlook, which works well
(thanks Chris!) . However, I can't seem to get the Reminder Date to set
correctly. What I want is for the Outlook Reminder Date to be set two days in
advance of the Due Date (which works fine), but it just sets to the same as
the Due Date which is not correct. Where am I going wrong? Fairly new to
coding, so be patient - I've posted my code below:
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Dim Subj As String
Dim Prob As String
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
Subj = "Helpdesk Call Reminder - Call Ref: TE(" & Me.Call_Ref & ")" &
vbCrLf & "User: " & Me.UserName & vbCrLf & "Problem Summary: " &
Me.Problem_Summary
Prob = Me.Problem_History
With OutlookTask
.Subject = Subj
.Body = Prob
.ReminderSet = True
.ReminderTime = DateAdd("d", -2, Me.Target_Date)
.DueDate = DateAdd("d", 0, Me.Target_Date)
.ReminderPlaySound = False
.ReminderSoundFile = "C:\Windows\Media\Ding.wav"
.Save
End With
Many thanks in advance
Martyn
Access 2000
Outlook 2000
Windows 2003 server over Citrix PS