Hi. I have created a button that sends an outlook task but I can't get the reminder or the reminder sound to work. The task is received with no reminder or sound yet the assigned due date is populated ok. I'm lost - does anyone have any ideas? Here's the code I'm using:
Private Sub QA1_Click()
On Error GoTo Err_QA1_Click
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)
myItem.Assign
Set myDelegate = myItem.Recipients.Add("bobi")
myItem.Subject = "New CAPA submitted for your review Bob " & "CAPA # " & CAPA_No
myItem.ReminderSet = True
myItem.ReminderTime = DateAdd("n", 5, Now)
myItem.DueDate = DateAdd("d", 2, Now)
myItem.ReminderPlaySound = True
myItem.ReminderSoundFile = "S:\capareview.wav"
myItem.Send
[Assigned_Verified_By] = "BobI"
Exit_QA1_Click:
Exit Sub
Err_QA1_Click:
MsgBox Err.Description
Resume Exit_QA1_Click
End Sub
thanks, Josh
Private Sub QA1_Click()
On Error GoTo Err_QA1_Click
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)
myItem.Assign
Set myDelegate = myItem.Recipients.Add("bobi")
myItem.Subject = "New CAPA submitted for your review Bob " & "CAPA # " & CAPA_No
myItem.ReminderSet = True
myItem.ReminderTime = DateAdd("n", 5, Now)
myItem.DueDate = DateAdd("d", 2, Now)
myItem.ReminderPlaySound = True
myItem.ReminderSoundFile = "S:\capareview.wav"
myItem.Send
[Assigned_Verified_By] = "BobI"
Exit_QA1_Click:
Exit Sub
Err_QA1_Click:
MsgBox Err.Description
Resume Exit_QA1_Click
End Sub
thanks, Josh