After you call objTask.Save, return objTask.EntryID and save it to a field
in the database record. You can then use that value later with the
Namespace.GetItemFromID method to retrieve the item.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Jalz" wrote in message
...
Hi Guys,
Sorry if this is the wrong forum for posting, couldn't find a vbscripting
forum for outlook. Anyway, here goes with my problem. I have some vbscript
which creates a task in outlook from my database program.
Const olTaskItem = 3
Set objOutlook = CreateObject("Outlook.Application")
Set objTask = objOutlook.CreateItem(olTaskItem)
objTask.Subject = "Schedul a Task"
objTask.Body = "Blah blah blah."
objTask.ReminderSet = True
objTask.ReminderTime = #27/01/2010 12:00 PM#
objTask.DueDate = #27/01/2010 12:00 PM#
objTask.ReminderPlaySound = True
objTask.ReminderSoundFile = "C:\Windows\Media\Ding.wav"
objTask.Save
The code above creates a task fine in my system. However what I would like
is some script to retrieve the unique outlook id of the task created and
save
the details in a text file which I can script an import and parse the data
through into my database.
Any help would be much appreciated -
Kind regards