Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating an Outlook Task with VB Script

1,705 views
Skip to first unread message

Pegasus (MVP)

unread,
Nov 28, 2007, 2:19:14 PM11/28/07
to
The following code fragment comes from here:
http://www.microsoft.com/technet/scriptcenter/resources/officetips/sept05/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


Sue Mosher [MVP-Outlook]

unread,
Nov 28, 2007, 4:13:37 PM11/28/07
to
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)" <I....@fly.com> wrote in message news:u8aytNfM...@TK2MSFTNGP04.phx.gbl...

Pegasus (MVP)

unread,
Nov 28, 2007, 4:33:42 PM11/28/07
to
Bingo! This one cost me a few hours of debugging time.
Now let's see if I can get Microsoft to adjust their web
page accordingly. . .

Thanks for your help. By the way, do have some link for
creating a Reminder instead of a Task?


"Sue Mosher [MVP-Outlook]" <sue...@outlookcode.com> wrote in message
news:ORIyROgM...@TK2MSFTNGP02.phx.gbl...


Try setting the DueDate before the ReminderTime.

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

--
Sue Mosher, Outlook MVP

"Pegasus (MVP)" <I....@fly.com> wrote in message

Sue Mosher [MVP-Outlook]

unread,
Nov 28, 2007, 5:06:45 PM11/28/07
to
There is no independent Reminder object. Messages, tasks, contacts, and appointments can all have reminders associated with them.

--
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)" <I....@fly.com> wrote in message news:OqZT2YgM...@TK2MSFTNGP05.phx.gbl...

0 new messages