Macro to reply messages with the original message attached
Posted on 2006-07-13
I am currently using this great code by BlueDevilFan below, it works like a dream but I want to be able to attach the original message at the bottom of my reply.
Can anyone help, its pretty urgent!
here is the current Macro I use in Outlook 2002:
commtext = "Your records have been de-duped"
Dim olSelection As Outlook.Selection, _
olResponse As Outlook.MailItem, _
objItem As Object, _
objTrash As MAPIFolder
Set objTrash = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderDeletedItems)
Set olSelection = Application.ActiveExplorer.Selection
For Each objItem In olSelection
If objItem.Class = olMail Then
Set olResponse = objItem.Reply
olResponse.Subject = "De-duped"
olResponse.Body = commtext
Set olResponse = Nothing
Set objItem = Nothing
Set olSelection = Nothing