View Single Post
  #2  
Old November 28th 07, 09:13 PM posted to microsoft.public.scripting.vbscript,microsoft.public.scripting.wsh,microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Creating an Outlook Task with VB Script

Try setting the DueDate before the ReminderTime.

Note that DueDate ignores any time element and stores 12 a.m. instead.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Pegasus (MVP)" wrote in message ...
The following code fragment comes from he
http://www.microsoft.com/technet/scr.../tips0908.mspx
Const olTaskItem = 3

Set objOutlook = CreateObject("Outlook.Application")
Set objTask = objOutlook.CreateItem(olTaskItem)

objTask.Subject = "Script Center Master Plan"
objTask.Body = "Final report for Script Center master plan."
objTask.ReminderSet = True
objTask.ReminderTime = #12/12/2007 09:00 AM#
objTask.DueDate = #12/12/2007 10:00 PM#

objTask.Save

It successfully creates an Outlook Task Item. Unfortunately it
appears to have major flaw: The Due Time and the ReminderTime
can be set for appointments that are in the past or on the current
day but not for those that are in the future. For future dates it gets
set to the Outlook "Working Day" default (e.g. to 08:00).

Does anyone know how to get around this problem? Or how
to create a "Reminder" instead of a "Task".

I'm using Outlook 2003


Ads