You still need to save the attachment to the file system no matter what. Use
SaveAs to save the file as a MSG file and then you can use
RDOSession.CreateMessageFromMsgFile to create an RDOMail item from the saved
MSG file, assuming it is actually an Outlook object saved as a MSG file.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Aaron" wrote in message
...
Hi Ken,
I am having the same problem. I have downloaded and installed
Redemption, but I still can't seem to get this to work. Do you have idea
where my code is wrong? Thanks!
Public Sub CopyAttachment(myMailItem As Outlook.MailItem)
Dim NS As Outlook.NameSpace
Dim olkFolderset As Outlook.Folders
Dim olkFolder As Outlook.Folder
Dim olkAttachedMSG, olkMailItem, olkNewMailItem As Outlook.MailItem
Dim redAttachment, redMailItem As Object
Dim strID As String
strID = myMailItem.EntryID
Set NS = Outlook.GetNamespace("MAPI")
Set olkFolder = NS.OpenSharedFolder("ITCS (POP)\Inbox")
Set olkMailItem = NS.GetItemFromID(strID)
Set redMailItem = CreateObject("Redemption.SafeMailItem")
redMailItem.item = olkMailItem
Set redAttachment = redMailItem.Attachment
Set olkAttachedMSG = redAttachment.EmbeddedMsg
Set olkNewMailItem = Outlook.CreateItem(olMailItem)
olkAttachedMSG.CopyTo (olkNewMailItem)
olkNewMailItem.Save
olkNewMailItem.Move (olkFolder)
End Sub