I am trying to modify an Excel/VBA application that sends email reminders to users to send out task requests. The following is a sample of the code used to send the emails (simplified here):
Sub TestMail()
Dim ol As Object
Dim myItem As Object
Dim olMailItem As Variant
' open outlook object
Set ol = CreateObject("outlook.application")
Set myItem = ol.CreateItem(olMailItem)
' format and send email message to [Recipient name]
myItem.To = "[Recipient name]"
myItem.Subject = "Subject text"
myItem.Body = "Body text"
myItem.Send
' cleanup
Set ol = Nothing
Set myItem = Nothing
On Error GoTo 0
End Sub
My question is: how can this code be modified to send a task request? I have tried a number of permutations but none seem to work. I have seen references to sending tasks on various sites (including ***** Clicks) but they don't work either. I am using Excel 2002 SP3 and Outlook 2002 SP3. Thanks for the help!
Roy
Bookmarks