|
-
May 16th, 2006, 09:07 AM
#2
Thread Starter
New Member
Re: Outlook task event
Hi, i found this
This Microsoft Visual Basic/Visual Basic for Applications (VBA) example accepts a TaskRequestItem, sending the response without displaying the inspector.
Sub AcceptTask()
Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myTasks As Outlook.MAPIFolder
Dim myNewTaskItem As Outlook.TaskItem
Dim mytaskreqItem As Outlook.TaskRequestItem
Dim myItem As Outlook.TaskItem
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myTasks = myNameSpace.GetDefaultFolder(olFolderInbox)
Set mytaskreqItem = myTasks.Items.Find("[Subject] = ""Meeting w/ Nate Sun""")
If Not TypeName(mytaskreqItem) = "Nothing" Then
Set myNewTaskItem = mytaskreqItem.GetAssociatedTask(True)
Set myItem = myNewTaskItem.Respond(olTaskAccept, True, True)
myItem.Send
End If
End Sub
however i think this one assumes that we know the subject name of the email that has the taskrequestitem is there's a way to go around that?
or even another totally different way @@?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|