Microsoft Product Support Services   All Products  |   Support  |   Search  | Home
  Support Home  |   Self Support  |   Assisted Support  |   Custom Support  |   Worldwide Support  |

PRB: CDO (1.x) Error MAPI_E_NOT_FOUND (8004010F)

The information in this article applies to:
  • Collaboration Data Objects (CDO), versions 1.1, 1.2, 1.21


You may receive the following error message:

Collaboration Data Objects
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
There are several reasons for this error message to appear. This article discusses some of the causes and resolutions for the error.


Following is a list of causes for the error:

  1. If your code is running in an Active Server Page (ASP), you may be passing a profile name to the Logon method where the profile does not exist on the Microsoft Internet Information Server (IIS) computer.

  2. You may be trying to use a resource that does not exist. This happens when you try to use a server or you try to logon to a mailbox that does not exist. A common cause of this is copying and pasting sample code without modifying the server and mailbox variables.

  3. You may be trying to resolve a recipient that does not exist.

  4. When retrieving elements from the folders collection through the Folders.Item(searchValue) statement, you may be trying to retrieve a previous item.

  5. You may be using the GetFreeBusy() method against an Exchange Server mailbox that has not been logged into yet, or that does not have any appointments in the calendar.

  6. While sending mail on Groupwise you may receive this error when accessing the Outbox or when calling the "Send" method.

  7. You may be attempting to set the value of a field (property) on a Collaboration Data Objects (1.1, 1.2, 1.21) object where the field (property) does not exist.


The following resolutions match the causes listed in the CAUSE section.

  1. You should use the ProfileInfo parameter on the Logon call instead of a specific profile name. This allows you to create a profile programmatically for the user of the ASP.

    The reason for this is that the user will not normally have profiles on the server machine, and they are probably not going to be loaded into HKEY_CURRENT_USER in order to be found by CDO (1.1, 1.2, 1.21).

  2. Check your code for variables that are used in the Logon method of Session object. Most ASP sample code contains a variable called "strProfileInfo". This is a combination of the server name, a line feed, and the mailbox name. Look for the variables that define the server and mailbox, and make sure that the resources are on your network and Exchange Server.

  3. Make sure that the recipient is as specified. If you pass an invalid recipient to CDO (1.1, 1.2, 1.21) in an ASP the only way to resolve the problem is to re-enter the recipient. You cannot call up the Address Book on the client.

  4. When retrieving elements from the folders collection through the Folders.Item(searchValue) statement you try to retrieve a previous item.

    The Folders.Item(searchValue) statement performs a forward search. So, if you use that statement to retrieve item two (2) of the folders collection and then later you try to access a previous item of the same collection, you receive the error.

    To work around this problem, use the index parameter of the Folders.Item() statement. The Item(index) syntax returns the Folder object at the indicated position in the collection.

    Alternatively, you could use the "GetFirst", "GetPrevious", "GetNext", and "GetLast" methods of the FoldersCollection object.

  5. Free/Busy information will not be available for a mailbox until it has been logged onto with a mail client and at least one appointment exists in the calendar for the mailbox.

    Here are three workarounds to this problem:

    • Log into the mailbox with an Outlook client to ensure that there is some Free/Busy information written to the mailbox. When you log into mail for the first time, Outlook creates an appointment item that in turn creates Free/Busy information.

    • Log into the mailbox with an Exchange client and start Schedule+ or just start Schedule+ by itself. This creates Free/Busy information in that mailbox, there is no need to actually create an appointment.

    • Use CDO (1.2, 1.21) to create a new test appointment so that Free/Busy information is created for that mailbox.

  6. While sending mail with a Novell GroupWise account, you may receive a MAPI_E_NOT_FOUND error while accessing the Outbox or calling the "Send" method.

    Use the following to resolve the error:

    • Specify NoMail:=True on the call to the Logon method of the Session object.

    • Make sure that the MAPI Spooler is not running already after having connected to GroupWise message store (such as with Outlook).

    NOTE: These workarounds can also solve other problems of sending mail with CDO (1.1, 1.2, 1.21) on a GroupWise account:

    • Message is sent, but text and attachments do not exist.

    • Message shows up in sent items, but is never delivered to recipient

  7. Instead of just setting the field value, proceed from the assumption that the field does not exist. Use the Add method of the Fields collection, which facilitates both adding the field and setting the value as follows: objMsg.Fields.Add &H00150040, 234 The preceding code sample demonstrates adding and setting the value for the PR_EXPIRY_LIMIT (&H00150040) field. No error occurs if the property already exists.


For information, please see the following articles in the Microsoft Knowledge Base:

Q183094 PRB: MAPI_E_NOT_FOUND Err Setting Value of Property with CDO

Q183250 PRB: CDO Error: Run-time error "-2147221233" with GetFreeBusy

Q195662 HOWTO: Log On to Exchange with the ProfileInfo Parameter

Additional query words:

Keywords : kbcode kbole kbCDO kbCDO110 kbCDO120 kbCDO121 kbMsg kbfaq kbGrpMsg
Issue type : kbprb
Technology :

Last Reviewed: April 28, 2000
2000 Microsoft Corporation. All rights reserved. Terms of Use.

Article ID: Q179639

Last Reviewed:
April 28, 2000

Send to a friend

Provided by
Microsoft Product Support Services

Did the information in this article help answer your question?

Did not apply

Please provide additional comments about this information.
(255 character max)