Discussion:
Error 429 on creation of MAPI Session
(too old to reply)
jm.almeras
2013-06-09 20:12:32 UTC
Permalink
Dear Outlook and VB experts,

In an Access database I have code which searches messages in the Outlook
Inbox folder. This code has worked fine for some time, and some time ago it
started not working any more. It produces a 429 error on the instruction
n°2 here below :

Set objOutlook = CreateObject("Outlook.Application")
Set objSession = CreateObject("MAPI.Session")

The error message says "An ActiveX component cannot create an object"
(translation from the original French message)

The computer is used by a small number of persons, I do not control
everything that other users do, but apparently there has been no significant
change (software updates, ...) which could explain this sudden malfunction.

We have the same database installed on another computer and it works fine
there, but under Access 2003 / Outlook 2003 whereas on the computer where
the error occurs we have Access 2002 / Outlook 2002

The code was adapted from code found on the Internet. I am no expert on
Outlook programming, I do not even know what a Mapi session is. I searched
the web for similar errors and found many articles speaking of "CDO". I
found advice to register a CDO dll but the system did not find this dll.

If you have any idea where the problem could be I will be very grateful if
you let me know

Jean-Marie
Bruno Campanini
2013-06-14 08:23:17 UTC
Permalink
Post by jm.almeras
Dear Outlook and VB experts,
In an Access database I have code which searches messages in the Outlook
Inbox folder. This code has worked fine for some time, and some time ago it
started not working any more. It produces a 429 error on the instruction n°2
Set objOutlook = CreateObject("Outlook.Application")
Set objSession = CreateObject("MAPI.Session")
Try using this sytax:
Dim Mail As Outlook.Folder
Set Mail = Session.GetDefaultFolder(olFolderSentMail)

Dim MailReceived As Outlook.Folder
Set MailReceived = Session.Folders("***@gmail.com").Folders("Inbox")

Dim Kontact As Outlook.Items
Set Kontact = Session.GetDefaultFolder(olFolderContacts).Items

Dim Kalendar As Outlook.Items
Set Kalendar = Session.GetDefaultFolder(olFolderCalendar).Items

etc.

Bruno

Loading...