task automation

S

Salvador

I am doing outlook task automation from excel and everything goes ok.
part of my code follows:

Private Sub TaskItem_Click()
Dim olApp As Outlook.Application
Dim olNewTask As TaskItem

Set olApp = CreateObject("Outlook.Application")
Set olNewTask = olApp.CreateItem(olTaskItem)

With olNewTask
.StatusUpdateRecipients = "[email protected]; [email protected]"
.....
.Display
End With

End Sub

However I require the task to be generated in an specific public folder.
How can that be done?
 
K

Ken Slovak - [MVP - Outlook]

Get a handle to that MAPIFolder and use its Items.Add method.
 
Top