C
Carlo Goretti
Guest
Im Trying to get all appointmnets for this day.. But dont know how to get it..
Here is my code..
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Credentials = new WebCredentials(Settings.Default.Email, Settings.Default.Password);
service.Url = Settings.Default.ServiceUrl;
service.TraceEnabled = true;
DateTime startDate = DateTime.Now;
DateTime endDate = startDate.AddHours(9);
const int NUM_APPTS = 5;fe
// Initialize the calendar folder object with only the folder ID.
CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, new PropertySet());
// Set the start and end time and number of appointments to retrieve.
CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS);
// Limit the properties returned to the appointment's subject, start time, and end time.
cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End);
// Retrieve a collection of appointments by using the calendar view.
appointments = calendar.FindAppointments(cView);
Someone who know what i can use instead of Startdate.AddHours(9)?
Im using C#
Thanks for all help!!
Continue reading...
Here is my code..
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Credentials = new WebCredentials(Settings.Default.Email, Settings.Default.Password);
service.Url = Settings.Default.ServiceUrl;
service.TraceEnabled = true;
DateTime startDate = DateTime.Now;
DateTime endDate = startDate.AddHours(9);
const int NUM_APPTS = 5;fe
// Initialize the calendar folder object with only the folder ID.
CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, new PropertySet());
// Set the start and end time and number of appointments to retrieve.
CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS);
// Limit the properties returned to the appointment's subject, start time, and end time.
cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End);
// Retrieve a collection of appointments by using the calendar view.
appointments = calendar.FindAppointments(cView);
Someone who know what i can use instead of Startdate.AddHours(9)?
Im using C#
Thanks for all help!!
Continue reading...