Link to home
Start Free TrialLog in
Avatar of Anne Troy
Anne TroyFlag for United States of America

asked on

Shortcut & macro to auto-forward an email. Outlook 2000

Hi there!

I'd love to have a macro that, when I select an email in my email list (not opened email), and hit Alt+S, it forwards the email to another email address.

stefri?

anyone else?


THANKS!!
Avatar of stefri
stefri
Flag of France image

Quite tricky. Outlook, AFAIK, does not accept keys not already present

Will the email address to be used always the same one?

Stefri
Avatar of Anne Troy

ASKER

Yep. Sorry. I should have said that.

And any keyboard shortcut is fine.
I only use Ctrl+K in Outlook. :)
ASKER CERTIFIED SOLUTION
Avatar of stefri
stefri
Flag of France 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
Ok!!
Going to try it out.
Will get back to you by the time you wake up tomorrow.
try now. I will sleep peacefully otherwise I will have nigthmare if there is an error in the code

stefri
Works great.
Now...anyway to have it auto-send instead of just creating the new msg? (I'll happily ask that as a new Q.)
As I mentionned, OL will complan: a program is trying to access blah lah blah
Comment myForward.Display True ' to display it but you have to click on Send and OL security warning too!!!!
Uncomment ' myForward.Send ' but you will have OL security wrning

What could be done is to use Redemption
Create a safeMailItem

sub fwrdTo()
Dim myForward as Object ' to forwrd anything whick can be forwarded
Dim colSelection As Outlook.Selection
dim forwardTo as string
dim SafeItem as object
Set colSelection = Application.ActiveExplorer.Selection

If colSelection.Count = 0 Then
   Set colSelection = Nothing
   Exit Sub
End If
' Forward to

forwardTo = "me@nowhere.com"


set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem

Set myForward = colSelection.item(1).forward

SafeItem.Item = myForward 'set Item property
SafeItem.Recipients.Add forwrdedTo
'               SafeItem.Display true ' to display it but you have to click on Send
SafeItem.Send ' but you will NOT have OL security wrning

set colSelection = nothing
end sub
redemption is at www.dimastr.com/redemption
You're a doll!
Thank you!!