Microsoft Office Tutorials and References
In Depth Information
Working with Appointments
Working with Appointments
Before I explain the Appointments feature in Microsoft Office Outlook 2007, let me
explain the Microsoft Office Outlook calendar. This will help you understand the
concepts of Appointments more easily, and also explain how you can utilize this
functionality for your needs. The Microsoft Outlook 2007 calendar is the scheduling
component of the Outlook mail management system. It is well-integrated with other
Microsoft Outlook functionality such as email, contacts, appointments, and other
items in.
Appointments are the actions you're scheduling in your Outlook calendar, inviting
other people to participate if required. You can set the status of your availability for
an appointment, and you can also schedule recurring appointments.
Let's create an Outlook Appointment dynamically by using VSTO objects and
C# programming:
Open Visual Studio 2008 and create a new solution, as described earlier. Write
the following code, which will dynamically create an Appointment item in the
ThisAddIn.cs file:
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
// Outlook AppointmentItem object to compose new Appointment
Outlook.AppointmentItem PacktAppointmentItem = (Outlook.
AppointmentItem)this.Application.CreateItem(Outlook.
OlItemType.olAppointmentItem);
// Set the subject property value
PacktAppointmentItem.Subject = "Regarding book review";
// Set the location property value
PacktAppointmentItem.Location = "Meeting Hall";
// Set the start date
PacktAppointmentItem.Start = DateTime.Today;
// Set the end date
PacktAppointmentItem.End = DateTime.Today;
// Set the body property value
PacktAppointmentItem.Body = "Book review comments from
all editors";
// Set the required attendee information
PacktAppointmentItem.RequiredAttendees = "vivek@vsto.com";
// Set the optional attandee information
PacktAppointmentItem.OptionalAttendees = "radhika@vsto.com";
// If parameter is set to false compose Appointment won't display
PacktAppointmentItem.Display(true);
// To send the composed PacktAppointmentItem
//((Outlook._AppointmentItem)PacktAppointmentItem).Send();
}
 
Search JabSto ::




Custom Search