PDA

View Full Version : Forward emai macrol button



wadio
04-16-2015, 11:12 PM
Hello to all I am new in this forum and new into VBA for Outlook 2010.

I have already done a macro and I am quite happy with it.

Now I need another one but seems I am not able to find a good solution.

What I need is a macro that will be linked to a button and when pressed, will forward the current opened message to an email, which can be defined into the code.

Hope you can help me guys!

gmayor
04-17-2015, 04:09 AM
I think something went missing in the translation from your native language. :confused:

You don't need a macro to forward a message. That facility is built into Outlook. Also built in are rules whereby you can automatically forward messages as they arrive. What will the macro add to this?

skatonni
04-20-2015, 11:33 AM
forward the current opened message to an email, which can be defined into the code.


Try this.


Sub speedForward()
Dim currentItem As Object
Dim newForward As Object
Set currentItem = ActiveInspector.currentItem
Set newForward = currentItem.Forward
'currentItem.Close (olDiscard)
newForward.Recipients.Add "someone AT somewhere DOT com"
newForward.Recipients.ResolveAll
newForward.Send
ExitRoutine:
Set currentItem = Nothing
Set newForward = Nothing
End Sub