Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using the following to succefully create tasks within Outlook but
only to the default Task folder. How can I specify to save the task to a particular task folder? Sub AddTasksToOutlook() '!! Reference to Outlook object library required !! Dim olTask As Outlook.TaskItem Dim olApp As Outlook.Application Dim lngRow As Long, shtSource As Worksheet 'Get reference to MS Outlook On Error Resume Next Set olApp = GetObject(, "Outlook.Application") If Err.Number < 0 Then Set olApp = CreateObject("Outlook.Application") End If On Error GoTo 0 Set shtSource = ActiveSheet 'Enter number of orders to process in A1 For lngRow = 2 To shtSource.Cells(1, 1).Value + 1 Set olTask = olApp.CreateItem(olTaskItem) With olTask .Subject = shtSource.Cells(lngRow, 2) + " " + shtSource.Cells(1, 3) .DueDate = CDate(DateValue(shtSource.Cells(lngRow, 3))) ' + shtSource.Cells(lngRow, 6)) .Categories = "Purchase Orders" .Save End With Next lngRow End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Perform task on multiple sheets in a folder | Excel Programming | |||
Sending a task from Excel to Outlook | Excel Programming | |||
Creating a task in outlook | Excel Programming | |||
OutLook Task and Appointment | Excel Programming | |||
linking an excel document to my task folder in outlook | Excel Discussion (Misc queries) |