Programmatically Adding holidays Calendars using Exchange Web Services
I'd like to know if it is possible to programmaticaly add Holidays Calendars using Exchange Web services ?
When using Outlook client, you can select holidays calendars from any countries to appear in your own calendar.
What I would liek to do is allowing user to select countries in my app, then checking if its personnal calendar contains the selected holidays calendars and if I can't find one, add it programmaticaly (the user is authenticated using Exchange Web Service Managed API)...
(M开发者_如何学JAVAy app is developped in C#)
any help welcome,
Fred.
It is possible. A "holiday" calendar entry is no different than any other appointment, so to add a holiday appointment, you'd search the user's appointments for each holiday date to determine if a "holiday" appointment already exists, and add a new appointment, if necessary.
As long as your app is the only thing adding holiday appointments, it should be easy to determine if an appointment exists, as you can use a naming convention or add a user property to indicate it's a "holiday" appointment.
There's always a risk that you'd miss an existing holiday appointment and add a second appointment---you'll need to determine how big of a risk this is.
精彩评论