Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

ASP outlook with no Exchange Server

Hi,
I have a very serious problem. :( I have been hunting the net for past 1 month, but the out come is nill.
My problem is I have to display calander items of a PST file from a ASP page, but there is no Exchange server. I have IIS installed & running well.
Can anybody help me solving the problem.
I just want the way I can get connected to the Outlook Pst file.

I have several documents which tells me how to get connected using WScript.
But I cannot modify that to get the solution for my problem
[532 byte] By [tarantula3] at [2007-11-11 7:52:13]
# 1 Re: ASP outlook with no Exchange Server
Though some security patches for Outlook make it a bit less than automated when writing scripts, there are options out there. This first link shows you how to accomplish this via MAPI. The other 2 links are a scripting technique and the final is more than enough info on CDO.

Good luck,

Reading Email via MAPI (http://c.ittoolbox.com/blogs/featuredentry.asp?i=5855)

Scripting Guys (http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec05/hey1205.mspx)

CDO (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncdsys/html/cdo_roadmap.asp)
msanchez at 2007-11-11 17:26:19 >
# 2 Re: ASP outlook with no Exchange Server
Const olFolderInbox = 6
Const olTxt = 0

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox)

Set colMailItems = objFolder.Items

According to the scripting code. These works well with a exchange server or
with a stand alone vb script, but it doesnt work :mad: when there is no exchange server and we try to access outlook via asp.
tarantula3 at 2007-11-11 17:27:19 >
# 3 Re: ASP outlook with no Exchange Server
I think the problem lies in your use of "GetDefaultFolder(olFolderInbox)"

This method is probably trying to open an Exchange-based Inbox folder.

Here's some code that may help:

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
...
' I'm not sure about this next line in your situation...
Set myRecipient = myNameSpace.CreateRecipient(sUser)
myRecipient.Resolve
If Not myRecipient.Resolved Then
MsgBox "Cannot resolve user '" & sUser & "'", vbOKOnly, sTitle & " - ERROR"
Else
Set MeetingRoomCalendarFolder = myNameSpace.GetSharedDefaultFolder(myRecipient, olFolderCalendar)
num_cal_items = MeetingRoomCalendarFolder.Items.Count
If num_cal_items = 0 Then
MsgBox "An error occurred...", vbCritical, sTitle & " - ERROR"
Else
...
End If
bschaettle at 2007-11-11 17:28:17 >