Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automaticlly Select From Address Depending on To Address

Posted on 2010-11-11
5
Medium Priority
?
331 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
The purpose of this video is to demonstrate how to use PicMonkey software to customize images for a Mailchimp campaign. Picmonkey is free and simple online software which can be used by users who don’t have robust editing software such as Photoshop,…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

618 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