S
Scott S.
I am by no means an Outlook programmer but my company has asked me to create
a simple program that will programmatically assign a task. I have been
toying with code and this code seems to work, but it triggers the Outlook
object modle guard messages. If I can get this code working using the
Redemption dll and avoid those annoying prompts then I it would be a pretty
easy sell to my managers to get them to purchase a distribution version of
Redemption.
your assistance is appreciated
Sub AssignTask()
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("Test2")
myDelegate.Resolve
If myDelegate.Resolved Then
myItem.Subject = "Error 505 Fix Printer
myItem.DueDate = Now + 30
myItem.Display
myItem.Send
MsgBox "success"
End If
End Sub
Scott Sommerfeldt
a simple program that will programmatically assign a task. I have been
toying with code and this code seems to work, but it triggers the Outlook
object modle guard messages. If I can get this code working using the
Redemption dll and avoid those annoying prompts then I it would be a pretty
easy sell to my managers to get them to purchase a distribution version of
Redemption.
your assistance is appreciated
Sub AssignTask()
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("Test2")
myDelegate.Resolve
If myDelegate.Resolved Then
myItem.Subject = "Error 505 Fix Printer
myItem.DueDate = Now + 30
myItem.Display
myItem.Send
MsgBox "success"
End If
End Sub
Scott Sommerfeldt