Forum Post: RE: Linking to Outlook Calendar

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

tbergman

Guest
This is pretty easy with .Net. You'll need to download and install the Microsoft Exchange Web Services Managed API 2.1. Then add a reference to your assemblies file. Here's some sample code I was playing with. USING System.*. USING Microsoft.Exchange.WebServices.Data.*. USING System.Net.Security.*. USING System.Security.Cryptography.X509Certificates.*. DEFINE VARIABLE service AS ExchangeService. DEFINE VARIABLE oBody AS Microsoft.Exchange.WebServices.Data.MessageBody. DEFINE VARIABLE appt AS Appointment. DEFINE VARIABLE ApptStart AS DATETIME. DEFINE VARIABLE ApptEnd AS DATETIME. apptStart = NOW. apptEnd = NOW + 3600000. service = NEW ExchangeService(ExchangeVersion:Exchange2010) . service:credentials = NEW WebCredentials(" some exchange account ", " some exchange password "). service:AutodiscoverUrl(" some exchange account "). oBody = NEW Microsoft.Exchange.WebServices.Data.MessageBody(). appt = NEW Appointment(service). oBody:BodyType = BodyType:HTML. oBody:Text = "My test B New Test appt /B ". appt:Body = oBody. appt:Start = ApptStart. appt:End = ApptEnd. appt:Save(). MESSAGE "done" VIEW-AS ALERT-BOX.

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