Link to home
Start Free TrialLog in
Avatar of E. Douglas (Doug) Jensen
E. Douglas (Doug) JensenFlag for United States of America

asked on

1-click Outlook 2007/2010 "attach" vs "Insert" for forwarding email

I am frequently switching between attaching a forwarded message and including a forwarded message. Instead of going through the multiple menus in OL2007/2010, I would like: (1) an icon I can place on a toolbar, and (2) a keyboard shortcut to make this change.
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of E. Douglas (Doug) Jensen

ASKER

Thank you. Unfortunately the forwarded message is always included either way the icon is toggled.

--Doug
I don't want to restart OL to change the setting :) Thank you for your effort.
Yeah, I understand.  Not suggesting that you should.  Just pointing out that if Outlook only reads the setting when it loads, then toggling the setting isn't going to work.  Unfortunately, there is no means I know of to change the setting other than writing to the registry.  The only other solution I can offer is to use two macros that emulate the two different forwarding actions.  Rather than toggling a setting and then using the built-in forward you'd run the macro that forwarded the way you want it to.  I can help with that if you want to take this approach.
I'm up for that, let's give it a try. Thank you.
Ok, here's the code for the two types of forwarding.  Be sure to set the default forwarding action to "Include original message text".  Once you've added the code to Outlook you can create two shortcuts, one that fires each macro.
Sub ForwardInline()
    Dim olkItm As Object, olkFwd As Outlook.MailItem
    For Each olkItm In Application.ActiveExplorer.Selection
        If olkItm.Class = olMail Then
            Set olkFwd = olkItm.Forward
            olkFwd.Display
        End If
    Next
    Set olkItm = Nothing
    Set olkFwd = Nothing
End Sub

Sub ForwardAsAttachment()
    Dim olkItm As Object, olkFwd As Outlook.MailItem
    For Each olkItm In Application.ActiveExplorer.Selection
        If olkItm.Class = olMail Then
            Set olkFwd = Application.CreateItem(olMailItem)
            olkFwd.Subject = "FW: " & olkItm.Subject
            olkFwd.Attachments.Add olkItm
            olkFwd.Display
        End If
    Next
    Set olkItm = Nothing
    Set olkFwd = Nothing
End Sub

Open in new window

My apologies for the delay in trying this, I am up to my eyeballs in short deadline stuff at work, I'll try it this weekend for sure. Thank you.

--Doug
No worries.
You might be over-estimating my competence :) I cut and pasted the new code into the previous macro and saved it and closed the editor.

1. The previous macro toolbar "project1" is still there with one button "Project1.ToggleForwardAction"
I want to remove it but if I uncheck its name "attach-include" nothing happens. I have both "attach-include" and "include attach," I'm not sure which one I just created and named which name.

2. The new macro is named "incude-attach" and there is one named "attach-include" that I think is the old one. Now View->Toolbars shows two toolbar choices, "attach-include" and "include-attach."I added the two buttons that were available "Project1,ForwardAsAttachment" and "Project1.Forwardinline" to "include-attach" since I'm sure that is the new one because you said to make include the default.

3. If I use View->toolbars I can enable either or both "include-attach" and "attach-include." "attach-include has no buttons.

4. With include as the default, the forwarding always includes and clicking the ForwardAsAttachment button does not work.

Please advise what all the mistakes are that I made. Thank you.