ironhide1975
Programmer
Is there an ASP application that can grab an exchange calendar for display on a webpage?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'pass a date for the outlook appoiintments
Public myAppDate as Date
'below an example of a string that you could pass to search among appointments subjects or body
Public mySearch as string
Public Function GetAppointments()
set myOutlook = createobject("Outlook.Application")
set myAppointments = myOutlook.AppointmentItem
'below is my best shot at getting the right date for the appointment
myAppointments.Calendar.Date = myAppDate
now you generate the html string
..dim myHTML as string
myHTML = "<P>myAppointments.Subject</P>"
myHTML = myHTML & "<BR>"<P>myAppointments.Body</P>"
myOutlook = nothing
myAppointments = nothing
'actual action of the function
response.write(myHTML)
end function
set myObj = createobject("Outlook_Apps.GetAppointments")
'now you pass the date to the public variable in the dll
myObj.myAppDate = "2006/01/01"
'========================================================
'CONSTANTS FOR THE CONTAINER RENDERER
'Time Zone Constants for the US
CONST CdoDefaultFolderCalendar = 0
CONST CdoTmzEastern = 10
CONST CdoTmzCentral = 11
CONST CdoTmzMountain = 12
CONST CdoTmzPacific = 13
'========================================================
'CONTAINER CONSTANT
CONST CdoClassContainerRenderer = 3
strProfileInfo = "serverName" & vbLf & "calendar"
Set objSession = Server.CreateObject("MAPI.Session")
objSession.Logon "", "", False, True, 0, True, strProfileInfo
objSession.SetOption "calendarstore", "outlook"
Set objRenderApp = Server.CreateObject("AMHTML.application")
Set objCRenderer = _
objRenderApp.CreateRenderer(CdoClassContainerRenderer)
ObjCRenderer.TimeZone = CdoTmzPacific
objCRenderer.DataSource = _
objSession.GetDefaultFolder(CdoDefaultFolderCalendar).Messages
Set objView = ObjCRenderer.Views("Daily Calendar")
objCRenderer.CurrentView = objView
objView.RenderAppointments now, Response
Collaboration Data Objects (0x4F9)
The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]
/calendar.asp, line 22
Set objSession = Server.CreateObject("MAPI.Session")
objSession.Logon([userCalendar],[password],[true],[true],[0],[true],[server])
objSession.SetOption "calendarstore", "outlook"
uName = request("username")
pWord = request("password")
Set objSession = Server.CreateObject("MAPI.Session")
objSession.Logon uName, pWord, false,true, 0, true, server
objSession.SetOption "calendarstore", "outlook"
Collaboration Data Objects (0x43F)
[Collaboration Data Objects - [E_INVALIDARG(80070057)]]