Last post Oct 29, 2007 12:15 AM by folkertsj
Sep 04, 2007 02:00 PM|kevtayproj|LINK
I'm using .net v1.1 currently and I'd like to be able to dynamically create an appointment and have it stored in the user's outlook calendar feature. The users are all on the same corporate domain. Anyone know how to do this or have code that handles this
sort of thing?
Sep 05, 2007 02:49 PM|kevtayproj|LINK
Ok, I've been able to successfully create a calendar appointment and it saves in my Outlook. The .Net application is being run from my local IIS. Now the problem comes in when connect to the application from another machine and using another employees
windows logon. It ask for credentials to get into my machine when it comes time to create the outlook appointment. Anyone have any ideas as to how to get this to work for other users on our network?
Public Sub CreateOutlookAppointment(ByVal WindowsAccount As String, ByVal dStartDateTime As String, ByVal dEndDateTime As String, ByVal strSubject As String, ByVal strBody As String, ByVal strLocation As String)
Dim oApp As Outlook.Application = New Outlook.Application
' Get NameSpace and Logon.
Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")
oNS.Logon(WindowsAccount.ToString, Missing.Value, False, True) 'TO DO;
' Create a new AppointmentItem.
Dim oAppt As Outlook.AppointmentItem = oApp.CreateItem(Outlook.OlItemType.olAppointmentItem)
' Set some common properties.
oAppt.Subject = strSubject
oAppt.Body = strBody
oAppt.Location = strLocation
oAppt.Start = Convert.ToDateTime(dStartDateTime)
oAppt.End = Convert.ToDateTime(dEndDateTime)
oAppt.ReminderSet = True
oAppt.ReminderMinutesBeforeStart = 15
oAppt.BusyStatus = Outlook.OlBusyStatus.olBusy ' olBusy
oAppt.IsOnlineMeeting = False
' Save to Calendar.
' Clean up.
oNS = Nothing
oAppt = Nothing
oApp = Nothing
Catch ex As Exception
Oct 29, 2007 12:15 AM|folkertsj|LINK
in a couple of day, check www.joshuafolkerts.com and go to the demos and downloads and there is an event calendar on there that might suit your needs..