OutLook Appointment RRS feed

  • Question

  • Can anyone please send the complete code in c# for outlook appointment creating,updating and deleting.

    Friday, August 10, 2007 7:41 AM


  • Hi,


    The article "Fast and Simple Mobile Access to Pocket Outlook Data" available at http://www.developer.com/ws/pc/article.php/3556186 gives a fairly good overview of how to use the Pocket Outlook API within a Windows Mobile 5.0 or higher device.


    The first page discusses how to add the required assembly references to your project, and utilise the OutlookSession object to create a connection to Pocket Outlook.


    Once you are in that position you should be able to add appointments by using a code sample such as the following.


    Code Snippet

    using (OutlookSession session = new OutlookSession())


      Appointment appt = new Appointment();

      // Set properties of "appt" here.





    For a list of the various properties you can set on an Appointment have a look at the following documentation on MSDN - http://msdn2.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.appointment_properties.aspx


    To update an appointment you make your changes to the properties of the Appointment instance and then call the Update method to commit the changes.


    To delete an appointment you simply call the Delete() method on an appointment you want to delete.


    A list of all current appointments can be found within the OutlookSession's Appointments property (as shown in the code sample above where a new appointment is added to the collection).


    Hope this helps,

    Christopher Fairbairn

    Monday, August 13, 2007 1:04 AM