VBScripting with Outlook Task ID

J

Jalz

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
 
S

Sue Mosher [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top