/** * Script:   appt.js * Purpose:  Add Appointment to Outlook Calendar * Author:   Brian White * Email:   brian@dynoapps.com * Date:  April 25, 2000 * Comments: This is a very basic example of creating *     an appointment item in Outlook.   * * Notes: To date, little testing has been done *     with other versions of Outlook and multiple *     profiles. *   *     Special thanks to Daren Thiel @ *        www.winscripter.com **/
/* Define Outlook constant for Appointment Item */
var olAppointmentItem = 1;
/* To add other Properties, refer to the Outlook Object Model */
function appt( Subject, Location, Start, ReminderMinutesBeforeStart )
{  this.Subject = Subject;  
this.Location  = Location;  
this.Start  = Start;  
this.ReminderMinutesBeforeStart = ReminderMinutesBeforeStart;}
function saveAppt( obj )
{  /* Create the Outlook Object and Appointment Item */ 
 out = new ActiveXObject( "Outlook.Application" );   /* Create an Appointment Item */  
appt = out.CreateItem( olAppointmentItem );
  /* Transfer the data */  
appt.Subject = obj.Subject;  
appt.Location  = obj.Location; 
appt.Start = obj.Start;  
appt.ReminderMinutesBeforeStart = obj.ReminderMinutesBeforeStart;
   /* Display the data */  
appt.Display();  /* If you want to save instead of viewing it change to appt.Save();*/
}
/* Set our values to be inserted into the Appointment */
newAppt = new appt("Everything Bridal Extravaganza", "Fleur de Lis Event Center, Mandeville LA", "09/23/2010 6:00 PM", "30");
/* Call our own function to save data */
saveAppt( newAppt );
/* Tell User to review the information */
WScript.Echo("Please Review the following Appointment Information");

