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

Re: Creating an Outlook Task with VB Script by Sue

Sue
Wed Nov 28 13:13:37 PST 2007

Try setting the DueDate before the ReminderTime.=20

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

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


"Pegasus (MVP)" <I.can@fly.com> wrote in message =
news:u8aytNfMIHA.5400@TK2MSFTNGP04.phx.gbl...
> The following code fragment comes from here:
> =
http://www.microsoft.com/technet/scriptcenter/resources/officetips/sept05=
/tips0908.mspx
> Const olTaskItem =3D 3
>=20
> Set objOutlook =3D CreateObject("Outlook.Application")
> Set objTask =3D objOutlook.CreateItem(olTaskItem)
>=20
> objTask.Subject =3D "Script Center Master Plan"
> objTask.Body =3D "Final report for Script Center master plan."
> objTask.ReminderSet =3D True
> objTask.ReminderTime =3D #12/12/2007 09:00 AM#
> objTask.DueDate =3D #12/12/2007 10:00 PM#
>=20
> objTask.Save
>=20
> 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).
>=20
> Does anyone know how to get around this problem? Or how
> to create a "Reminder" instead of a "Task".
>=20
> I'm using Outlook 2003=20
>=20
>

Re: Creating an Outlook Task with VB Script by Pegasus

Pegasus
Wed Nov 28 13:33:42 PST 2007

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]" <suemvp@outlookcode.com> wrote in message
news:ORIyROgMIHA.1296@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.can@fly.com> wrote in message
news:u8aytNfMIHA.5400@TK2MSFTNGP04.phx.gbl...
> 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
>
>



Re: Creating an Outlook Task with VB Script by Sue

Sue
Wed Nov 28 14:06:45 PST 2007

There is no independent Reminder object. Messages, tasks, contacts, and =
appointments can all have reminders associated with them.=20

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


"Pegasus (MVP)" <I.can@fly.com> wrote in message =
news:OqZT2YgMIHA.4808@TK2MSFTNGP05.phx.gbl...
>=20
> By the way, do have some link for
> creating a Reminder instead of a Task?