LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Searching for an Outlook Task from Excel

I got some help regarding creating an outlook task from Excel....that worked...

I would now like to be able to search for an existing outlook task on a
users PC and then if it exists update it...

I have the following code so far....Find statement does not seem to be
returning values but the search values are valid for entries in the Outlook
tasks....

Any help appreciated....

Sub CreateTask()

Dim olApp As Outlook.Application
Dim olTsk As TaskItem

Dim olFoundTask As TaskItem
Dim olTasks As Outlook.MAPIFolder
Dim olNameSpace As Outlook.Namespace


Set olApp = CreateObject("Outlook.Application")
Set olNameSpace = olApp.GetNamespace("MAPI")
Set olTasks = olNameSpace.GetDefaultFolder(olFolderTasks)
Set olFoundTask = olTasks.Items.Find("[Subject] = 'Jeff'")


Set olApp = New Outlook.Application
Set olTsk = olApp.CreateItem(olTaskItem)

With olTsk
.Subject = Range("A6")
.Status = olTaskInProgress
.Importance = olImportanceHigh
.DueDate = Range("B6")
.TotalWork = 40
.ActualWork = 20
.CardData = "New" & Range("b6")
.Save
End With

Set olTsk = Nothing
Set olApp = Nothing

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending task to Outlook from Excel [email protected] Excel Programming 0 April 23rd 07 11:09 AM
Sending a task from Excel to Outlook Pasty Excel Programming 0 March 28th 07 01:49 AM
How can i have Excel automatically set an Outlook task? VT Excel Discussion (Misc queries) 0 July 31st 06 11:49 AM
Create Outlook Task from Data in Excel Row Theresa Excel Programming 0 October 20th 05 01:57 AM
import outlook task to excel stabekk Excel Programming 1 November 18th 03 06:01 PM


All times are GMT +1. The time now is 08:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"