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

Creating an Outlook Task with VB Script



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 28th 07, 07:19 PM posted to microsoft.public.scripting.vbscript,microsoft.public.scripting.wsh,microsoft.public.outlook.program_vba
Pegasus \(MVP\)
external usenet poster
 
Posts: 6
Default Creating an Outlook Task with VB Script

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
  #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


  #3  
Old November 28th 07, 09:33 PM posted to microsoft.public.scripting.vbscript,microsoft.public.scripting.wsh,microsoft.public.outlook.program_vba
Pegasus \(MVP\)
external usenet poster
 
Posts: 6
Default Creating an Outlook Task with VB Script

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]" wrote in message
...
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)" 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




  #4  
Old November 28th 07, 10:06 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

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)" wrote in message ...

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


 




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
Creating a task in Outlook from Access Blogd_Node Outlook and VBA 4 February 3rd 07 04:38 AM
Creating a script to backup pst? Rob Outlook - General Queries 3 January 26th 07 09:07 AM
Outlook 2k3 Script: Creating Borders in Excel news.microsoft.com Outlook and VBA 1 November 14th 06 05:19 PM
Outlook 2k3 Script: Exporting Task item to Excel news.microsoft.com Outlook and VBA 5 November 8th 06 04:01 PM
Outlook 2003 Script: How to create an Id for task news.microsoft.com Outlook and VBA 6 October 20th 06 10:16 PM


All times are GMT +1. The time now is 01:31 PM.


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