ID: Q191816
The information in this article applies to:
When using the MoveTo method of the message object to move a message from one folder to another folder within a mailbox, you may receive the following error:
Run-time error '-2147467259 (80004005)':
[Collaboration Data Objects - [E_FAIL(80004005)]]
It is probable that the sending limit property has been set on the mailbox and there are enough messages in the mailbox to meet the limit criteria.
The sending limit can be set or checked using the following:
1. Using the Exchange Administrator get the properties for the mailbox.
2. Click the Limits tab.
3. Go to the settings for the "Information store storage limits".
4. Change the "Prohibit send(K)" and "Prohibit send and receive(K)"
settings to a higher value.
-or-
Delete messages from the mailbox so the limit is not met, and empty the
deleted items folder.
This behavior is by design.
The MoveTo Method relocates the message object to another folder specified in the call. All of the properties that are set on the message are moved during this process. Once the Message.MoveTo method is called, the message is no longer available in the original location, only the new location.
Set objMovedMessage = objMessage.MoveTo(folderID [, storeID ] )
where
- objMessage: This Message object.
- folderID: The unique identifier of the destination Folder object in
which this message is to appear.
- storeID: The unique identifier of the InfoStore object in which the
message is to appear, if different from this current
InfoStore.
1. Set the sending limit on a mailbox to a low value (for example, 100k)
2. Run the following Visual Basic code sample that uses the MoveTo method
to try and move a message to another folder in the mailbox:
'The following Visual Basic Code sample relies on a reference to the
'Collaboration Data Objects (CDO) Library. If you do not have this
'library, please see the following article in the Microsoft Knowledge
'Base:
'
' ARTICLE-ID: Q171440
' TITLE : Where to Acquire Collaboration Data Objects Libraries
'
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 yields 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
RESULT: The preceding error is returned on the line that executes the
.MoveTo method.
Additional query words:
Keywords : kbole kbCDO kbCDO110 kbCDO120 kbCDO121 kbMsg
Version : WINDOWS:1.1,1.2,1.21
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: December 12, 1998