Reply to all with attachments in Outlook 2003

I have found a solution from jeepstyx22 for how to Reply with attachments - by creating a macro and assigning it to a toolbar button as below.  That works fine, but does someone know how to edit the code to create a macro for Reply to All with attachments?
Follow the steps below and you can create a new button on your message toolbar which will create a reply and attach any current file attachments.
 
In outlook main windows go to Tools->Macro->Visual Basic Editor.
In the visual Basic Editor goto Insert->Module.
Paste the code at the end of this message.
Open a new message.
Goto View->Toolbars->Customize.
Select the Commands Tab.
Click the command Rearrange Commands
Select the Toolbar Radio Button.
Verify that the drop down box next to the button says Standard.
Click the Add button.
Select Macros from the left list. and in the right list Project1.ReplyWithAttach should be highlighted.
Click OK
Move the command up or down to position it where you like. Then click close.  You should now see a button that says Project1.ReplyWithAttach
 
Public Sub ReplyWithAttach()
    'Make declarations
    Dim myOlApp As Outlook.Application
    Dim myInspector As Outlook.Inspector
    Dim myItem As Outlook.MailItem
    Dim myReplyItem As Outlook.MailItem
    Dim myAttachments As Outlook.Attachments
    Dim myReplyAttachments As Outlook.Attachments
    Dim fso
    Dim TempFolder As String
    Set fso = CreateObject("Scripting.FileSystemObject")
    TempFolder = fso.GetSpecialFolder(2)
    Set myOlApp = CreateObject("Outlook.Application")
    Set myInspector = myOlApp.ActiveInspector
    
    'Create variable to store files names 10 max if you need more then 10, change the value below
    Dim filenames(10) As String
    
    If Not TypeName(myInspector) = "Nothing" Then
        If TypeName(myInspector.CurrentItem) = "MailItem" Then
            Set myItem = myInspector.CurrentItem
            Set myAttachments = myItem.Attachments
            If myAttachments.Count > 0 Then
                For Count = 1 To myAttachments.Count
                    myAttachments.Item(Count).SaveAsFile "c:\" & myAttachments.Item(Count).DisplayName
                    filenames(Count) = myAttachments.Item(Count).DisplayName
                Next
                
                Set myItem = myInspector.CurrentItem
                Set myReplyItem = myItem.Reply
                Set myReplyAttachments = myReplyItem.Attachments
                
                For Count = 1 To myAttachments.Count
                    myReplyAttachments.Add "c:\" & filenames(Count), olByValue, 1, "4th Quarter 1996 Results Chart"
                    myReplyItem.Display
                    fso.DeleteFile "c:\" & filenames(Count)
                Next
                
            End If
        Else
            MsgBox "The item is of the wrong type."
        End If
    End If
End Sub

Open in new window

bbrq750Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David LeeCommented:
Hi, bbrq750.

Change line 46 to
 
    Set myReplyItem = myItem.ReplyAll
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bbrq750Author Commented:
Thanks.  Easy when you know how.
Mick
0
David LeeCommented:
"Thanks."
You're welcome, Mick.

"Easy when you know how."
Very true.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.