Button to Forward and Move

Status
Not open for further replies.

consultant

Member
Outlook version
Outlook 2013 64 bit
Email Account
IMAP
I want to add a custom button to Outlook 2013 that when I press it forwards the email to a pre-defined address and changes the sender address (from) to a standard address (as I'm using the button on multiple accounts but it needs to come from the same account), then, moves the message to a predefined folder.

I'd prefer the forwarded message not get saved to my sent items folder (I'm using IMAP)

Thanks in advance for the help!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Quick Steps can handle the Forward part but the messages will be sent from the account that received them. If you want always send from a specific address, you'll need to use a macro.

This should do it for you

Code:
Public Sub ForwardUsingOneAccount() 
 
Dim oAccount As Outlook.Account 
 
Dim oMail As Outlook.MailItem 
 
For Each oAccount In Application.Session.Accounts
  If oAccount = "me@domain.com" Then
    Set oMail = Application.ActiveExplorer.Selection(1).Forward
      oMail.SendUsingAccount = oAccount
      oMail.Recipients.Add ("alias@domain.com")
  End If 
 
Next
 
 
oMail.Display 'or use .send 
 
End Sub
That is from http://slipstick.com/outlook/email/choose-the-account-to-send-a-reply-from/
 

consultant

Member
Outlook version
Outlook 2013 64 bit
Email Account
IMAP
Is that code appropriate to associate with a button to run the operation on the current e-mail being viewed? I don't see why if would have to loop through all the accounts? I do use though a macro to give me a unified view of the inbox of multiple accounts. I discovered the built-in Move to OneNote button does not work from that search view but I don't mind having to go into individual account inboxes to move items. Ideally though I could highlight multiple emails within the unified view and use the macro button to forward them (as described) and move them all to a sub-folder of the inbox in one particular account. I think that might be hard and maybe not necessary though. I could live I guess with using the sent folder in each account (or one account if that is how it ends up working) as my archive of the emails I forwarded. Trying to keep this simple.
What about moving the file after to a specified folder instead of the sent folder?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Yes, it will work with a button on the ribbon. The macro assumes the messages arrived on any of your accounts and you want to always send using Account B - so it needs to loop through looking for the correct account.

If you are moving mail to a specific folder, use a Quick Step. You can move sent messages to another folder - you can turn off the option to automatically save sent items and use an after sending rule to save everything in other folders.
 

consultant

Member
Outlook version
Outlook 2013 64 bit
Email Account
IMAP
Doesn't it make a difference that I want the e-mail to still go to the sent folder, but only go to a specific folder when I use this macro button?
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
B forward button in Outlook 2010 toolbar is greyed out and does not work Using Outlook 2
C When I go to the inbox, to forward a message, there is no forward button. Where do I find the forwar Using Outlook 2
B Back/Forward button does not work in Outlook 2002 installed on netbook Using Outlook 1
M Forward email as insert from button Outlook VBA and Custom Forms 1
N Which Button Was Clicked on the Ribbonbar Menu Outlook VBA and Custom Forms 2
E Can't accept or decline task (no button appears) Using Outlook 4
M VbScript for Command Button on Contacts Custom Form Using Outlook 1
Q Prompt button to auto turn on Out of Office Outlook VBA and Custom Forms 3
C iCloud Setting missing Outlook tab and Outlook missing the iCloud refresh button Using Outlook 4
witzker Outlook 2010 Insert Date & Time at the button of an OL contactform in red Using Outlook 2
S How to set up button in ribbon for individual Quick Steps Using Outlook 1
C Custom Outlook Form - Populate Information from Radio Button / Check Box Using Outlook 0
J Command Button to stamp a date and time in a textbox in Outlook 2016 Outlook VBA and Custom Forms 3
A ScanPST finding errors but no Repair button Using Outlook 2
N Creating a button or link to a form in the Organizational Forms Library Outlook VBA and Custom Forms 3
J Execute Add-In Button from VBA Outlook 2016 Outlook VBA and Custom Forms 1
D Command Button code will not execute. Any suggestions Please. Outlook VBA and Custom Forms 2
S Reminder Dialog Open Button Using Outlook 2
Wayne Dardis Calling Ribbon Button in Outlook 2016 Outlook VBA and Custom Forms 6
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
R Categorize Button in Quick Access Toolbar Disappears on New Email Using Outlook 1
S Problem running Command button code Outlook VBA and Custom Forms 2
E Button to change subject Outlook VBA and Custom Forms 1
S Shortcut/button to a Calendar Group Using Outlook 0
soadfan Enable all rules from toolbar button? Outlook VBA and Custom Forms 3
I Creating meeting invite with disabled tentative button Outlook VBA and Custom Forms 5
Diane Poremsky Contacts are missing when you click the To button New Slipstick.com Articles 0
T Unable to 'Upload a file' using popup 'Browse' button Using Outlook 0
makinmyway ScanPST.exe Missing Repair Button Using Outlook 15
williamlambton Reinstate "Open" button on mail item right-click context menu. Outlook Wishlist 2
K Remove Manage APPS button for users Exchange Server Administration 1
J Send and Receive Button - only check default account? Using Outlook 1
A custom send button Outlook VBA and Custom Forms 3
P Possibility to create a calendar button "remaining week"??? Using Outlook 3
E Outlook 2007: Problem with "Move to Folder >" button on toolbar Using Outlook 6
E Button in body of email to approve/reject with original text Using Outlook 1
H Preventing the Send button from being clicked on an Outlook Form Outlook VBA and Custom Forms 1
S Create a custom "Send" Button Outlook VBA and Custom Forms 3
makinmyway Can I add a Map It Button to Custom Contact Form? How? Outlook VBA and Custom Forms 6
R How can I retain embedded object with voting button reply? Using Outlook 5
G Moving "Delete" button on Outlook for Mac Using Outlook 1
K OL2010 Button to Insert First Name Outlook VBA and Custom Forms 6
K OL2010 Button to Insert First Name Using Outlook 1
R Outlook 2013 People Pane - Where is the "Add" button for social networks? Using Outlook 4
A delete button on message list disappeared Using Outlook 19
M button to send and print emails Using Outlook 26
V Macro for 'Back' button Using Outlook 17
S Code behind form command button Using Outlook 2
C Contacts Button on Custom Form Using Outlook 1
J Custom Contacts: Linking button to website Using Outlook 4
Similar threads


















































Top