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
From novice to tech pro — start learning today.