williamsba
Programmer
I am trying to link a webpage to a public folder in Outlook. Now I found some sample code that is supposed to do this but for some reason it is not showing up. I know that i didnt include much detail, but Im not very good with ASP yet. Here is the code:
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<META HTTP-EQUIV="Content-Type" content="text/html;charset=iso-8859-1">
<TITLE>G-6 Help Desk</TITLE>
</HEAD>
<BODY>
<%
CONST strServer = "158.237.164.65"
CONST strMailbox = "IUSR_2fssgras"
Dim objSession
Dim objMessages
Dim objOneMessage
Dim objInfoStores
Dim objInfoStore
Dim objTopFolder = "pub.edb"
Dim objFolders = "All Public Folders"
Dim objSubFolder = "2FSSG"
Dim objTargetFolder = "G6 HelpDesk"
Dim strProfileInfo
Dim i
Dim bstrPublicRootID
strProfileInfo = strServer & vblf & strMailbox
Set objSession = Server.CreateObject("MAPI.Session"
objSession.Logon, , , False, , True, strProfileInfo
Set objInfoStores = objSession.InfoStores
For i = 1 To objInfoStores.Count
If objInfoStores.Item(i)="Public Folders" Then
Set objInfoStore=objInfoStores.Item(i)
Exit For
End If
Next
bstrPublicRootID = objInfoStore.Fields.Item(&H66310102).Value
Set objTopFolder = objSession.GetFolder(bstrPublicRootID, _
objInfoStore.ID)
Set objFolders = objTopFolder.Folders
Set objFolder = objFolders.GetFirst()
Do Until objFolder.Name = "G6 HelpDesk"
Set objFolder=objFolders.GetNext()
Loop
Set objMessages = objFolder.Messages
For Each objOneMessage in objMessages
Response.Write("objOneMessage.Subject = " & objOneMessage.Subject & "<br>"
Response.Write("objOneMessage.Text = " & objOneMessage.Text & "<br>"
Next
objSession.Logoff
Set objOneMessage = Nothing
Set objMessages = Nothing
Set objFolder = Nothing
Set objTopFolder = Nothing
Set objSession = Nothing
%>
</BODY>
</HTML>
Any info on this subject would be extremely helpful..
Thank you [sig]<p>Brad Williams<br><a href=mailto:williamsba1@2fssg.usmc.mil>williamsba1@2fssg.usmc.mil</a><br><a href= FSSG Homepage</a><br> [/sig]
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<META HTTP-EQUIV="Content-Type" content="text/html;charset=iso-8859-1">
<TITLE>G-6 Help Desk</TITLE>
</HEAD>
<BODY>
<%
CONST strServer = "158.237.164.65"
CONST strMailbox = "IUSR_2fssgras"
Dim objSession
Dim objMessages
Dim objOneMessage
Dim objInfoStores
Dim objInfoStore
Dim objTopFolder = "pub.edb"
Dim objFolders = "All Public Folders"
Dim objSubFolder = "2FSSG"
Dim objTargetFolder = "G6 HelpDesk"
Dim strProfileInfo
Dim i
Dim bstrPublicRootID
strProfileInfo = strServer & vblf & strMailbox
Set objSession = Server.CreateObject("MAPI.Session"
objSession.Logon, , , False, , True, strProfileInfo
Set objInfoStores = objSession.InfoStores
For i = 1 To objInfoStores.Count
If objInfoStores.Item(i)="Public Folders" Then
Set objInfoStore=objInfoStores.Item(i)
Exit For
End If
Next
bstrPublicRootID = objInfoStore.Fields.Item(&H66310102).Value
Set objTopFolder = objSession.GetFolder(bstrPublicRootID, _
objInfoStore.ID)
Set objFolders = objTopFolder.Folders
Set objFolder = objFolders.GetFirst()
Do Until objFolder.Name = "G6 HelpDesk"
Set objFolder=objFolders.GetNext()
Loop
Set objMessages = objFolder.Messages
For Each objOneMessage in objMessages
Response.Write("objOneMessage.Subject = " & objOneMessage.Subject & "<br>"
Response.Write("objOneMessage.Text = " & objOneMessage.Text & "<br>"
Next
objSession.Logoff
Set objOneMessage = Nothing
Set objMessages = Nothing
Set objFolder = Nothing
Set objTopFolder = Nothing
Set objSession = Nothing
%>
</BODY>
</HTML>
Any info on this subject would be extremely helpful..
Thank you [sig]<p>Brad Williams<br><a href=mailto:williamsba1@2fssg.usmc.mil>williamsba1@2fssg.usmc.mil</a><br><a href= FSSG Homepage</a><br> [/sig]