Forward or reply using other account

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have some rules which forwards incoming email messages based on the sender
name and subect to another address.

My problem is that I would like to forward the messages using a certain
account, not the same like the incoming accouunt. This cannot be done with
rules... I've tried.

Maybe there is a VBA code that can do something like that.

Thanks in advance for any suggestion,
 
You can't change the sending account using the Outlook Object Model, but you
can automate the selection of the account in the dropdown on the Standard
toolbar, provided you open the e-mail first:

Sub ChangeSendingAccount()
Dim objCBPU As Office.CommandBarPopup
Dim objCBB As Office.CommandBarButton

Set objCBPU = ActiveInspector.CommandBars.FindControl(, 31224) 'get
Accounts button on Standard toolbar

'Get menu item by name or index number
Set objCBB = objCBPU.Controls.Item("&1 Microsoft Exchange Server")
'Set objCBB = objCBPU.Controls.Item(2)

objCBB.Execute

Set objCBPU = Nothing
Set objCBB = Nothing
End Sub
 
Thanks very much.
But pls explain me some more... I am a newbie with VBA.
How do you make it work? I've tried to run it from inside of VB Editor but I
get an error.
How do you refer to the routine?

Thanks in advance

Catalin
 
Back
Top