/**
* Script: addOlTask.js
* Purpose: Add a task to Outlook
* Author: Daren Thiel
* Date: 19 April 1999
* Web: http://www.winscripter.com
* Comments: This is a very basic example of creating
* a task item in Outlook. Many additional
* properties can be set that are not covered.
*
* Notes: This example assumes that either
* 1. a session of Outlook is running (or)
* 2. The user is not prompted for a profile
**/
/* Define Outlook constant for Task Item */
var olTaskItem = 3;
/* Create an instance of Outlook */
ol = new ActiveXObject( "Outlook.Application" );
/* Create a Task Item */
task = ol.CreateItem( olTaskItem );
/* Set some properties of the task */
task.Subject = "Hello World Task";
task.DueDate = "1/1/99";
task.DateCompleted = "1/2/99";
/* Save the Task */
task.Save();
/* Tell the user we are done! */
WScript.Echo( "Done" );