Microsoft KB Archive/191816

= Run-time error -2147467259 with CDO (1.x) MoveTo method =

Article ID: 191816

Article Last Modified on 10/5/2005

-

APPLIES TO


 * Microsoft Collaboration Data Objects 1.1
 * Microsoft Collaboration Data Objects 1.2
 * Microsoft Collaboration Data Objects 1.21

-



This article was previously published under Q191816



SYMPTOMS
When you use the MoveTo method of the Message object to move a message from one folder to another folder in a mailbox, you may receive the following error message:

Run-time error '-2147467259 (80004005)':

[Collaboration Data Objects - [E_FAIL(80004005)]]



CAUSE
This behavior may occur because the sending limit property has been set on the mailbox, and there are enough messages in the mailbox to meet the limit criteria.



RESOLUTION
To resolve this behavior, use one of the following methods:
 * Method 1

Change the sending limit. To do this, follow these steps:
 * In Exchange Administrator, view the properties for the mailbox.
 * Click the Limits tab.
 * Locate the settings for Information store storage limits.
 * Change the Prohibit send(K) setting and the Prohibit send and receive(K) set to larger values.
 * Method 2

Delete messages from the mailbox so that the sending limit is not met. Then, empty the Deleted Items folder.



STATUS
This behavior is by design.



MORE INFORMATION
The MoveTo method relocates the Message object to another folder specified in the call. All the properties that are set on the message are moved during this process. After the Message.MoveTo method is called, the message is no longer available in the original location. The message is only available in the new location.

Sample syntax
Set objMovedMessage = .MoveTo( [,  ] ) Placeholders:
 * : This Message object.
 * : The unique identifier of the destination Folder object in which this message is to appear.
 * : The unique identifier of the InfoStore object in which the message is to appear, if different from this current InfoStore object.

Steps to reproduce the behavior
 Set the sending limit on a mailbox to a low value. For example, set the value to 100 kilobytes (KB).  Run the following Visual Basic code sample. This code sample uses the MoveTo method to try to move a message to another folder in the mailbox. 'The following Visual Basic Code sample relies on a reference to the 'Collaboration Data Objects (1.1, 1.2, 1.21) Library. If you do not 'have this library, see the following article in the 'Microsoft Knowledge Base: '     '   ARTICLE-ID: 171440 '  TITLE     : Where to acquire the CDO Libraries (all versions) '     Sub main Dim objSess As MAPI.Session Dim objDelFolderID As String Dim objMsg As Message Dim objMovedMsg As Message

Set objSess = CreateObject("mapi.session") objSess.Logon "Tiny Exchange Only Mailbox"

'Get the ID of the DeletedItems Folder. objDelFolderID = _ objSess.GetDefaultFolder(CdoDefaultFolderDeletedItems).ID

Set objMsg = objSess.Inbox.Messages.GetFirst

'The following line causes an error if the store is already full. Set objMovedMsg = objMsg.MoveTo(objDelFolderID)

objMovedMsg = Nothing objMsg = Nothing objDelFolderID = Null

objSess.Logoff objSess = Nothing End Sub 

You receive the error message that is mentioned in the "Symptoms" section. The error is returned on the line that executes the MoveTo method.

Keywords: kbmsg kbprb kbcode KB191816

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.