Article ID: 192083
Article Last Modified on 3/4/2004
'This code sample depends on a reference to the CDO
'(1.1, 1.2, 1.21)library, otherwise known as the Collaboration Data
'Objects library. If you do not have this library, please see the
'following article in the Microsoft Knowledge Base:
' ARTICLE-ID: Q171440
' TITLE : Info: Where to Acquire Collaboration Data Objects
Library
'
Dim objSess As MAPI.Session
Dim objOutbox As Folder
Dim objMsg As Message
Dim strENTRYID As String
Sub main()
Set objSess = CreateObject("mapi.session")
objSess.Logon
Set objOutbox = objSess.Outbox
Set objMsg = objOutbox.Messages.Add
With objMsg
.Text = "Nothing here."
.Subject = "Save this sent message to an " & _
"alternalte Folder rather than Sent Items!!!"
'Add field and populate with EntryID of Deleted Items Folder
strENTRYID = _
objSess.GetDefaultFolder(CdoDefaultFolderDeletedItems).ID
.Fields.Add CdoPR_SENTMAIL_ENTRYID, strENTRYID
.Recipients.Add Name:="MyEmailName"
.Recipients.Resolve
.Send
End With
End Sub
Keywords: kbmsg kbprb kbcode KB192083