Microsoft KB Archive/179639

From BetaArchive Wiki
Knowledge Base


Article ID: 179639

Article Last Modified on 10/5/2005



APPLIES TO

  • Microsoft Collaboration Data Objects 1.21
  • Microsoft Collaboration Data Objects 1.1
  • Microsoft Collaboration Data Objects 1.2



This article was previously published under Q179639


SYMPTOMS

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.

CAUSE

Following is a list of causes for the error:

  1. If your code is running in an Active Server Pages (ASP) page, you may be passing a profile name to the Logon method where the profile does not exist on the computer that is running Microsoft Internet Information Server (IIS).
  2. You may be trying to use a resource that does not exist. This issue occurs when you try to use a server or you try to log on to a mailbox that does not exist. A common cause of this issue 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 you are sending mail on Groupwise, you may receive this error message when you access the Outbox or when you call the Send method.
  7. You may be trying 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.


RESOLUTION

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

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

    You do this because the user will not ordinarily have profiles on the server, and the profiles 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 that is named strProfileInfo. This variable is a combination of the server name, a line feed, and the mailbox name. Look for the variables that define the server and the mailbox, and make sure that the resources are on the network and on the computer that is running 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 page, 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. Therefore, 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 method, the GetPrevious method, the GetNext method, and the GetLast method of the FoldersCollection object.
  5. Free/Busy information will not be available for a mailbox until the mailbox has been logged on to by using a mail client and at least one appointment exists in the calendar for the mailbox.

    Here are three workarounds for this problem:
    • Log on to the mailbox by using an Outlook client to make sure that some Free/Busy information is 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 on to the mailbox by using an Exchange client and start Schedule+, or start Schedule+ by itself. This creates Free/Busy information in that mailbox. You do not have 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 you are sending mail on Groupwise, you may receive this error message when you access the Outbox or when you call 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 the following other problems of sending mail by using CDO (1.1, 1.2, 1.21) on a GroupWise account:

    • The message is sent, but text and attachments do not exist.
    • The message appears in sent items but is never delivered to the recipient
  7. Instead of just setting the field value, assume that the field does not exist. Use the Add method of the Fields collection. By using the Add method, you can both add the field and set the value as follows.

    objMsg.Fields.Add &H00150040, 234

    The previous code sample demonstrates adding and setting the value for the PR_EXPIRY_LIMIT (&H00150040) field. No error occurs if the property already exists.


REFERENCES

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

183094 CDO (1.x) error MAPI_E_NOT_FOUND setting value of property


183250 CDO (1.x) error: Run-time error '-2147221233' with GetFreeBusy


195662 How to log on to Exchange with the ProfileInfo parameter


Keywords: kbmsg kbgrpdsmsg kbole kbprb kbfaq kbpending kbcode KB179639