Solved

Automaticlly Select From Address Depending on To Address

Posted on 2010-11-11
5
323 Views
Last Modified: 2012-05-10
Hi,
I'm looking for some kind of email client solution that can do the following...

I manage several email addresses and sometimes I forget to change the send from when sending to different people. Is there some kind of plugin or software that can automatically detect who I am emailing then change my from address?

I have access to Thunderbird, Gmail and Outlook.

Thanks!!!
0
Comment
Question by:really24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 34121786
Hi, really24.

What version of Outlook?
0
 

Author Comment

by:really24
ID: 34134647
Hi BlueDevilFan,
I have Outlook 2007.

Do you know if it would be possible with Gmail's web interface?
Thanks!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 34134990
Sorry, I don't use Gmail so I don't know if it's possible there.  It's is possible with Outlook through the use of scripting.  If you want to pursue that solution, then I can help.  I can provide the code and instructions for using it.
0
 

Author Comment

by:really24
ID: 34161098
Hi BlueDevilFan,
Sure, I'll try using Outlook from now on and see how it goes.

Thanks!
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 34169929
Ok, try this.  Follow these instructions to add the code to Outlook.

1.  Start Outlook
2.  Click Tools > Macro > Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click Tools > Trust Center
9.  Click Macro Security
10. Set Macro Security to "Warnings for all macros"
11. Click OK
12. Close Outlook
13. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

You'll need to know the index number of each account.  The index number if the account's position in the list of accounts you seen when you create a new message and click the Account pulldown.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim olkRcp As Outlook.Recipient, _
        intIndex As Integer, _
        olkSendThroughBtn As Object, _
        olkSendAccount As Object
    If Item.Class = olMail Then
        intIndex = 1
        For Each olkRcp In Item.Recipients
            Select Case LCase(olkRcp.Address
                'On the next line change the email address'
                Case "john.doe@company.com"
                    'On the next line change the index number'
                    intIndex = 2
                Case "jane.doe@hotmail.com"
                    intIndex = 4
            End Select
            If intIndex > 1 Then
                Exit For
            End If
        Next
        If intIndex <= Session.Accounts.count Then
            Set olkSendThroughBtn = Application.ActiveInspector.CommandBars("Standard").Controls(3)
            Set olkSendAccount = olkSendThroughBtn.Controls(intIndex)
            olkSendAccount.Execute
            Item.Save
        End If
    End If
    Set olkRcp = Nothing
    Set olkSendThroughBtn = Nothing
    Set olkSendAccount = Nothing
End Sub

Open in new window

0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Explore the encryption capabilities built into Google Apps and how these features can help you meet privacy policy and regulatory compliance, but are not a full solution. Understand and compare the most popular email encryption services for Google A…
The purpose of this video is to demonstrate how to set up an account with Mailchimp. This will be demonstrated using a Windows 8 PC. Tools Used are: Mailchimp.com Go to Mailchimp.com : Enter an Email, Username, and Password. Click Create My Acco…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question