Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read a mail, and get the sender !!

Status
Not open for further replies.

vivis

IS-IT--Management
Oct 1, 2002
17
MX
Hi I need to do a script that read all mails in Outlook but only takes a few based on the sender, I found this code but when I try to run it,(I have WinNT) I get the following message:

ActiveX component can't create object: 'MAPI.Session'

set objSession=CreateObject("MAPI.Session")
set objSession.Logon="bla"
set objInbox=objsession.Inbox.messages
for each objMessages In objSession
if obj.Sender="x@.com" then
str Message=objMessage.Body
end if
next

Does somebody knows what this error means?? Thanx a lot!!
 
If this script is part of HTML page and, as is, running under IE, check activeX security permissions of the browser.

Another hint (under IE or stand alone VBS) : search your registry to see if this ActiveX object (MAPI.session) is registred on your computer (this object is registred when installing outlook if I remember well). Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top