with the below VBA code I was able to create a new button on the Outlook 2010 ribbon from which I can send emails with my default email address.
Now I want to have a similar button on the Outlook 2010 ribbon for "replying / replying all". Outlook selects, when "replying" or "replying all", by default the mail address as sender the mail came into but I would like to send all my emails with the default email address.
That's the VBA script I used to which I found in that tutorial here: http://www.sevenforums.com/tutorials/129318-outlook-2010-always-send-default-account.html
Public Sub New_Mail()
Dim oAccount As Outlook.Account
Dim oMail As Outlook.MailItem
For Each oAccount In Application.Session.Accounts
If oAccount = "Name of Default Account" Then
Set oMail = Application.CreateItem(olMailItem)
oMail.SendUsingAccount = oAccount
oMail.Display
End If
Next
End Sub
Any ideas how to change the above code or does anyone have an idea how I can create such buttons on the outlook ribbon for "replying" emails?
Thank you!
No comments:
Post a Comment