A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

VBScripting with Outlook Task ID



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 31st 10, 11:38 PM posted to microsoft.public.outlook.program_vba
Jalz
external usenet poster
 
Posts: 4
Default VBScripting with Outlook Task ID

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
Ads
  #2  
Old February 1st 10, 01:35 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default VBScripting with Outlook Task ID

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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email to Task, move task to 'Other Tasks' folder to sync w/Sharepoint mitcham Outlook and VBA 3 August 26th 08 05:55 AM
Help Desk and Assigned Help Task Sample not creating task on cliK doc4a Outlook - Using Forms 0 July 16th 08 09:47 PM
adding field to DEFAULT New Task or saving customized Task as Temp glennn.php[_2_] Outlook - Using Forms 3 July 7th 08 10:39 PM
How do I re-enable the ability for VbScripting? Candy Outlook - General Queries 1 May 7th 08 06:06 AM
How do I drag a task in task list of Outlook. It will not let me. rpetralia Outlook - Calandaring 2 April 5th 06 10:14 AM


All times are GMT +1. The time now is 07:03 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.