S
scott56hannah
Hi,
I have created a basic routine that will create a Task item and then send it
another user for acceptance. The code executes and sends the Task to the user
but when it arrives the user cannot select the task and it does not populate
into their Tasks within outlook. ....see below for the sample code that I am
using
Sub TestAssignTask()
'Can't seem to create a task that is sent to another user that can be edited
'By the assigned user
'Can send the Task but when it arrives it does not populate into the outlook
Task items or open when double clicked
Dim myOlApp As New Outlook.Application
Dim myItem As Outlook.TaskItem
Dim myDelegate As Outlook.Recipient
Set myItem = myOlApp.CreateItem(olTaskItem)
myItem.Assign
Set myDelegate = myItem.Recipients.Add("(e-mail address removed)")
myDelegate.Resolve
If myDelegate.Resolved Then
myItem.Subject = "Test Subject into your Task list"
myItem.DueDate = Now + 30
myItem.Status = olTaskNotStarted
myItem.Categories = "Tester"
myItem.Body = "Test Body"
myItem.Importance = olImportanceHigh
myItem.Display
myItem.Send
End If
End Sub
Any help appreciated....
I have created a basic routine that will create a Task item and then send it
another user for acceptance. The code executes and sends the Task to the user
but when it arrives the user cannot select the task and it does not populate
into their Tasks within outlook. ....see below for the sample code that I am
using
Sub TestAssignTask()
'Can't seem to create a task that is sent to another user that can be edited
'By the assigned user
'Can send the Task but when it arrives it does not populate into the outlook
Task items or open when double clicked
Dim myOlApp As New Outlook.Application
Dim myItem As Outlook.TaskItem
Dim myDelegate As Outlook.Recipient
Set myItem = myOlApp.CreateItem(olTaskItem)
myItem.Assign
Set myDelegate = myItem.Recipients.Add("(e-mail address removed)")
myDelegate.Resolve
If myDelegate.Resolved Then
myItem.Subject = "Test Subject into your Task list"
myItem.DueDate = Now + 30
myItem.Status = olTaskNotStarted
myItem.Categories = "Tester"
myItem.Body = "Test Body"
myItem.Importance = olImportanceHigh
myItem.Display
myItem.Send
End If
End Sub
Any help appreciated....