Home » Questions » Computers [ Ask a new question ]

How to "Reply to All" and keep the original attachment in Outlook?

How to "Reply to All" and keep the original attachment in Outlook?

How could I perform a "Reply to all" in Outlook, but resending the original attachment back to all?

Asked by: Guest | Views: 322
Total answers/comments: 2
bert [Entry]

"Apparently not without some VBA code. Here's something I found that purports to do exactly that. (Source)

Description: This Outlook VBA sample creates and displays a reply to the currently open or selected message including the attachments in the original.

Sub ReplyWithAttachments()
Dim rpl As Outlook.MailItem
Dim itm As Object

Set itm = GetCurrentItem()
If Not itm Is Nothing Then
Set rpl = itm.Reply
CopyAttachments itm, rpl
rpl.Display
End If

Set rpl = Nothing
Set itm = Nothing
End Sub

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application

Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case ""Explorer""
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case ""Inspector""
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
End Select

Set objApp = Nothing
End Function

Sub CopyAttachments(objSourceItem, objTargetItem)
Set fso = CreateObject(""Scripting.FileSystemObject"")
Set fldTemp = fso.GetSpecialFolder(2) ' TemporaryFolder
strPath = fldTemp.Path & ""\""
For Each objAtt In objSourceItem.Attachments
strFile = strPath & objAtt.FileName
objAtt.SaveAsFile strFile
objTargetItem.Attachments.Add strFile, , , objAtt.DisplayName
fso.DeleteFile strFile
Next

Set fldTemp = Nothing
Set fso = Nothing
End Sub

Notes on the code:

Uses the GetCurrentItem() function to return the currently selected or displayed item.
Uses the CopyAttachments() procedure to copy the attachments to the reply.
Replace itm.Reply with itm.ReplyAll if you prefer to reply to all.

(Oh, and I found this in about 30 seconds doing a web search for ""reply to all with attachments in outlook"")."
Enixss [Entry]

order atorvastatin 40mg generic <a href="https://lipiws.top/">order lipitor pills</a> order lipitor 40mg pills