Forum Post: RE: Read appointments using exchange web service (EWS)

  • Thread starter thomas.rothlisberger
  • Start date
Status
Not open for further replies.
T

thomas.rothlisberger

Guest
Hi I am using OE11.3 on windows Server 2008. I have put together the following code but I can't figure out what sort of object I need in the find command (= calendar.findAppointments(cview). Using cappt is giving me incompatible data type. I tried various ones but can't get it to work. Below is my code example: USING System.*. USING Microsoft.Exchange.WebServices.Data.*. USING System.Net.Security.*. USING System.Security.Cryptography.X509Certificates.*. DEFINE VARIABLE service AS ExchangeService. DEFINE VARIABLE ApptStart AS DATETIME. DEFINE VARIABLE ApptEnd AS DATETIME. apptStart = NOW. apptEnd = NOW + 3600000. service = NEW ExchangeService(ExchangeVersion:Exchange2013) . service:credentials = NEW WebCredentials("myemailaddress", ""). service:AutodiscoverUrl("myurl"). def var cView as Microsoft.Exchange.WebServices.Data.CalendarView. def var calendar as Microsoft.Exchange.WebServices.Data.CalendarFolder. def var cappt as Microsoft.Exchange.WebServices.Data.Appointment. calendar = CalendarFolder:Bind(service, WellKnownFolderName:Calendar, new PropertySet()). cView = new CalendarView(apptStart, apptEnd, 5). cappt = calendar:FindAppointments(cView). message cappt:Subject.

Continue reading...
 
Status
Not open for further replies.
Top