Article ID: 191816
Article Last Modified on 10/5/2005
Set objMovedMessage = <objMessage>.MoveTo(<folderID> [, <storeID> ] )Placeholders:
'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 SubKeywords: kbmsg kbprb kbcode KB191816