Troubleshooting "MAPI_E_NOT_FOUND" error

R

rich

Hello All,

I have a user who has an MS-Access application used to distribute surveys.
The application interops with Outlook to distribute the survey to 995 users.
No problems with this application in the past. After selecting the 995 users
from a Word document, the application then tries to load the 995 recipients
to send them. It loads 65 users, then the following error is encountered:

Error: A fatal error has occurred -2147221233 (collaboration data objects
-(MAPI_E_NOT_FOUND))) -2147221233.

I Googled the error and found:
Reference: http://support.microsoft.com/kb/254567
The above page also references
http://support.microsoft.com/kb/166599/EN-US/. This page has a registry
hack as resolution.

This is the fix recommended in the above 2nd KB article:
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows Messaging SubsystemTo create
the registry entry, do the following:
1. Start Registry Editor (Regedt32.exe) and go to the following key:
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows Messaging Subsystem
2. On the Edit menu, click Add Value.
3. Type the following values:
String Value: ProfileDirectory
Value Data: Path to the directory you want the temporary files to be created
in.
Example: C:\MyComputer\Temporary.

This does not pan out as there are no permission issues and using FileMon, I
don't see where anything is trying to access folders for which the user does
not have access. Also, a web server nor the IUSR account is not involved in
the application.

Can anyone help me understand / troubleshoot this error?

TIA,

Rich
 
K

Ken Slovak - [MVP - Outlook]

Is this code running against Outlook connected to an Exchange server? If so
it's possible the code is running into the 255 open RPC channel limit that's
the default for Exchange. That limit can only be changed in the registry of
the Exchange server.

What happens is that an RPC channel is opened for every Outlook object
reference. If you are opening an item that opens a channel. If you access a
property on the item that can open a channel. Use of dot operators opens
internal variable objects that aren't released until the loop ends or the
procedure exits.

I don't know your code but it's possible that's the problem. In that case
make sure that you explicitly declare variables for each dot operator and
release all objects instantiated within any loops by setting them to Nothing
each pass through the loop.
 
R

rich

Hello Ken and thanks for the reply.

It'll take some doing to verify this, but I doubt this is the case. This
has been working for a good while and I don't see where this setting would
have changed within the Exchange 2003 server environment.

Can you provide any more detail on how this type of application would hit
the RPC channel limit? Note that I am a desktop support techie, not Exchange.
What type of things would open the RPC channel? Is each reference to an
email address an event that would open a channel?

Thanks,

Rich
 
K

Ken Slovak - [MVP - Outlook]

Almost any access to an Outlook property opens an RPC channel. For example
take a simple case of an Outlook Selection collection and iterating it,
where "Sel" is the Selection:

For i = 1 to Sel.Count

That will open a channel every time through the loop as Sel.Count is
accessed. The following code only opens 1 RPC channel:

Dim Count As Long
lCount = Sel.Count
For i = 1 To lCount

If your loop has something like this:

strEmailAddress = Sel.Item(i).Email1Address

That will open new RPC channels each pass through the loop. The channels and
internal variables will remain live until the procedure ends.

Using this will close the channels explicitly:

oMail = Sel.Item(i)
strEmailAddress = oMail.Email1Address
Set oMail = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top