C
Chad Parks
I am trying to run this code:
<%@ Language = VBscript %>
<%
' Create MAPI session
Set objSession = CreateObject("MAPI.Session")
' Logon using an existing MAPI session
objSession.Logon "", "", False, False, 0
' Get folder where the current Outlook item lives
Set objFolder = Item.Parent
' Get the Outlook item with CDO
Set objMessage = objSession.GetMessage(Item.EntryID, objFolder.StoreID)
' Get the sender of the message
Set objSender = objMessage.Sender
' Pull out some properties of the sender
MsgBox "Sender name: " & objSender.Name
MsgBox "Sender address: " & objSender.Address
' Close MAPI session
objSession.Logoff
%>
<html>
<head>
<title>Outlook Mail Test</title>
</head>
<body>
</body>
</html>
Can anyone tell me what this error means and how to correct it please:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'MAPI.Session'
/mailtest.asp, line 6
Line 6 = Set objSession = CreateObject("MAPI.Session")
Thanks for your help!!
Chad Parks
<%@ Language = VBscript %>
<%
' Create MAPI session
Set objSession = CreateObject("MAPI.Session")
' Logon using an existing MAPI session
objSession.Logon "", "", False, False, 0
' Get folder where the current Outlook item lives
Set objFolder = Item.Parent
' Get the Outlook item with CDO
Set objMessage = objSession.GetMessage(Item.EntryID, objFolder.StoreID)
' Get the sender of the message
Set objSender = objMessage.Sender
' Pull out some properties of the sender
MsgBox "Sender name: " & objSender.Name
MsgBox "Sender address: " & objSender.Address
' Close MAPI session
objSession.Logoff
%>
<html>
<head>
<title>Outlook Mail Test</title>
</head>
<body>
</body>
</html>
Can anyone tell me what this error means and how to correct it please:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'MAPI.Session'
/mailtest.asp, line 6
Line 6 = Set objSession = CreateObject("MAPI.Session")
Thanks for your help!!
Chad Parks