Re: Problem with creating MAPI session
From: Sue Mosher [MVP-Outlook] (suemvp_at_outlookcode.com)
Date: 10/26/04
- Next message: Sue Mosher [MVP-Outlook]: "Re: Populating Combo Boxes."
- Previous message: tdog: "Re: enable outlook security.oft to allow programs to send email wi"
- In reply to: Chad Parks: "Problem with creating MAPI session"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 26 Oct 2004 12:44:44 -0400
Most likely it means that CDO is not installed on the machine where the code
is running.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Chad Parks" <Chad Parks@discussions.microsoft.com> wrote in message
news:BC31CACF-C238-4E35-860D-0FF832A428C1@microsoft.com...
>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
>
>
>
>
- Next message: Sue Mosher [MVP-Outlook]: "Re: Populating Combo Boxes."
- Previous message: tdog: "Re: enable outlook security.oft to allow programs to send email wi"
- In reply to: Chad Parks: "Problem with creating MAPI session"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|