'An
AppointmentItem 'TempAppItem' object represent one appointment
Dim TempAppItem As
Outlook.AppointmentItem =
TempApp.CreateItem(Outlook.OlItemType.olAppointmentItem)
TempAppItem.Subject =
"Create Outlook Appointment Item with VB.NET"
TempAppItem.Body =
"We can create appointment with the help of vb.net"
'Set Location
TempAppItem.Location =
"No Location"
'Set start
date and times
TempAppItem.Start =
Convert.ToDateTime("11/08/2009 10:00:00 AM")
'Set end
date and times
TempAppItem.End =
Convert.ToDateTime("11/08/2009 11:00:00 AM")
'set the
Reminder box if you want Outlook to remind you the appointment is coming up.
TempAppItem.ReminderSet =
True
TempAppItem.ReminderMinutesBeforeStart = 5
'we can
choose how the time is categorized (Busy, Tentative, Free, and so on)
TempAppItem.BusyStatus =
Outlook.OlBusyStatus.olBusy
TempAppItem.IsOnlineMeeting
= False
' Save to
Calendar.
TempAppItem.Save()
TempApp =
Nothing
TempAppItem =
Nothing
Note: The most improtant point
here to performing all tasks is to add a reference to "Microsoft Outlook object
library", In case of
- Microsoft Outlook 2000 - Add "Microsoft
Outlook 9.0 object library"
- Microsoft Outlook 2002 - Add "Microsoft
Outlook 10.0 object library"
- Microsoft Outlook 2003 - Add "Microsoft
Outlook 11.0 object library"
- Microsoft Outlook 2007 - Add "Microsoft
Outlook 12.0 object library"