Click here to Skip to main content
14,106,748 members
Click here to Skip to main content
Add your own
alternative version


23 bookmarked
Posted 27 May 2010
Licenced CPOL

Setting up an MS Outlook Appointment C#

, 28 May 2010
Rate this:
Please Sign up or sign in to vote.
This is a simple article describing how to create an add an outlook appointment to your MS Outlook Calender.

This is a simple article describing how to create an add an outlook appointment to your MS Outlook Calender.

Using the code
This article has been made as straight forward as possible for you, simple follow the steps (1-7) and in no time you should have the app up and running. You can find a full example (With screen shots for importing reference) included in the download file.

Step 1 - Import the outlook reference

The first thing that you need to do is add a reference to the Microsoft Outlook 12.0 Object Library.

1.1. [Right click] on your [Project solution] – [Click] on [Add reference]

1.2. [Click] on the [COM] tab – Scroll down until you find Microsoft Outlook 12.0

1.3 [Click] OK

Step 2 // Sets up and creates an outlook calender entry
Outlook.Application outlookApp = new Outlook.Application(); // creates new outlook app
Outlook.AppointmentItem oAppointment = (Outlook.AppointmentItem)outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem); // creates a new appointment

Step 3 // Set appointment settings
oAppointment.Subject = "Enquiry Changes made to " + name + "'s enquiry"; // set the subject
oAppointment.Body = "This is where the appointment body of the appointment is written"; // set the body
oAppointment.Location = "Nicks Desk!"; // set the location
oAppointment.Start = Convert.ToDateTime(notesDate); // Set the start date 
oAppointment.End = Convert.ToDateTime(notesDate); // End date 
oAppointment.ReminderSet = true; // Set the reminder
oAppointment.ReminderMinutesBeforeStart = 15; // reminder time
oAppointment.Importance = Outlook.OlImportance.olImportanceHigh; // appointment importance
oAppointment.BusyStatus = Outlook.OlBusyStatus.olBusy;

Step 4 // save the appointment

Step 5 - Check your outlook calender

Appointment will now be added to your calender

Step 6 // send the details in email
Outlook.MailItem mailItem = oAppointment.ForwardAsVcal(); 
// email address to send to 
mailItem.To = "">; 
// send 

Step 7 - Finished

Your appointment will now have been created and added to your outlook calender. An email will have also been sent to the address you specified.


Now that we have created the mailItem, not only will the appointment be added to your calendar, but an email sent to an address of your choice.
This small application is very useful and can save you a lot of time and effort. It is well worth implementing as a standalone app or as an add on to an existing one.

Thanks Nick Austin DecodedSolutions


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author
Software Developer (Junior)
United Kingdom United Kingdom
We are software developers and we specialise in all software development.

Visit Decoded Solutions NOW for all your development needs.

You may also be interested in...

Comments and Discussions

Questionhow to send calender attachment from specific email to multiple persons Pin
Member 103787677-Nov-18 9:16
memberMember 103787677-Nov-18 9:16 
QuestionoAppointment Pin
Mike Forscutt18-Aug-15 0:36
memberMike Forscutt18-Aug-15 0:36 
Questionreminder is showing none in recipient side Pin
Member 1074369128-Jan-15 21:26
memberMember 1074369128-Jan-15 21:26 
QuestionPDF Attachment for the appointment created Pin
Sameer_Deakin20-Oct-14 20:27
memberSameer_Deakin20-Oct-14 20:27 
QuestionAbout Namesaces Pin
alaa bektash30-Nov-13 0:01
memberalaa bektash30-Nov-13 0:01 
AnswerRe: About Namesaces Pin
Mike Forscutt18-Aug-15 0:28
memberMike Forscutt18-Aug-15 0:28 
Generalabout the final mail sent with appointment Pin
niveditha 200912-Jul-12 10:19
memberniveditha 200912-Jul-12 10:19 
QuestionI like this, I'm using 14.0 library but this still works Pin
dixbear18-Apr-12 5:06
memberdixbear18-Apr-12 5:06 
AnswerRe: I like this, I'm using 14.0 library but this still works Pin
niveditha 200912-Jul-12 10:21
memberniveditha 200912-Jul-12 10:21 
GeneralRe: I like this, I'm using 14.0 library but this still works Pin
zemuss12-Aug-12 9:33
memberzemuss12-Aug-12 9:33 
GeneralRe: I like this, I'm using 14.0 library but this still works Pin
Member 103787677-Nov-18 9:21
memberMember 103787677-Nov-18 9:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190518.1 | Last Updated 28 May 2010
Article Copyright 2010 by
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid