Hi, I am trying to design a code that will send an outlook appointment to specified email recipients in an InfoPath 2003 form (I'm using Outlook 2007 on an exchange server as part of a large project group- the infopath form is basically a project plan where the organiser can assign tasks and arrange meetings).
I have worked out the following code which can put in a pre-defined appointment:
function appt( subject, Location, Start, End, ReminderMinutesBeforeStart )
{
this.Subject = Subject; this.Location = Location; this.Start = Start; this.End = End; this.ReminderMinutesBeforeStart = ReminderMinutesBeforeStart;
}
function saveAppt( obj )
{
out = new ActiveXObject("Outlook.Application");
appt = out.createItem( olAppointmentItem );
appt Subject = obj.Subject;
appt.Location = obj.Location;
appt.Start = obj.Start;
appt.End = obj.End;
appt.ReminderMinutesBeforeStart = obj.ReminderMinutesBeforeStart;
appt.Save ();
}
newAppt = new appt ("Subject goes here", "Location goes here", "The start time and date","End Time and date","Reminder time");
saveAppt( newAppt );
}
What I would like to be able to do is be able to send this to another user, rather than putting it in my own calendar. I would also like to specify the appointment information using field values in the form. Is this possible?
Cheers