I want the default account used to send emails to be fixed

I have Outlook 2000.  My Outlook downloads emails from a few different email accounts.  When replying to an email the default is for that reply to be from the address the original mail was sent to.  I instead want the default address to always be the same address, no matter which email I'm replying to.  

For example,

I want the default address I'm sending emails from to always be jon@gmail.com.

Right now, if emails come in to the address jon@yahoo.com, and I hit reply, the default is to send from jon@yahoo.com.  I want, instead, for the default to be from jon@gmail.com.

Get what I'm saying?  

Is this possible with Outlook 2000?  Would a macro have to be programmed in VBA?  Is that possible?  

Thank you!
Ajw43022Asked:
Who is Participating?
 
David LeeConnect With a Mentor Commented:
The SetSendThroughAccount I posted in 24567240 (above) is ready to go.  Simply create a toolbar button and link it to the procedure.  It's immaterial what module the code is in.
0
 
apache09Commented:
In Outlook go to Tools>Account Settings

You should see your various accounts listed.

Here Select the account you want as default and choose set as default
0
 
Ajw43022Author Commented:
Yeah, I've tried that.  Unfortunately it doesn't quite do the job.  

I've got jon@gmail.com (example) set as the default.  And so when I create new emails they are, by default, sent from that account.  That's good.

But when I reply to emails, the default is for the reply to be from the account the email was sent to.  If it was sent to jon@yahoo.com, by default, the reply will be from jon@yahoo.com.  I want it to always be from jon@gmail.com.  
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
apache09Commented:
Ahh I see.....

When you open a new email.
Choose Options from the Toolbar
Under Delivery Options select, "have replies sent to:   ............"
Enter the email address you want replies sent to.

If you want every email you send to be the same
Open a new blank email.
Set this Option with the email address you want your replies sent to.
Then go to File Save As
And save this blank email as an Outlook Template.
Can save it to desktop if you would like
Then when you want to create a new email just open this template
Compose your email and hit send

the Reply to option will already be set.
0
 
Ajw43022Author Commented:
I think there might still be some miscommunication here.  I'm not trying set the "reply-to" address -- I know I can fix that permanently under Accounts.

I want emails I send OUT to always be from the same address, by default.

Right now if someone sends an email to me, at jon@yahoo.com, and I respond to it, by default my response will be FROM the address jon@yahoo.com.  It will be sent out using that account.  I want it to be sent out using another account, jon@gmail.com, always, by default.  I want that account, jon@gmail.com, to always be the default email account that emails are sent out from.  Setting that account as the default account under Accounts doesn't do this.  
0
 
mlmccCommented:
I looked and didn't find any options that seemed to address this in Outlook.  I had a similar problem while on the road since my ISP won't allow email to be sent unless I am connected to them and not just through the net.

Outlook/Outlook Express worked fine from home but when I traveled out of the local area, I couldn't use that address to send from.  The only solution I found was to display the FROM line in all new/reply/forward emails and change it manually to an account that would work.

mlmcc
0
 
Ajw43022Author Commented:
Yeah, I'd prefer not to have to change it manually each time.  I'm thinking there's probably a way to do this in VBA, but I'm not sure how?
0
 
Rob132332Commented:
Hi - you may want to post a pointer question with VBA in the title to get some VBA feedback.  
I saw your question, and set it to monitor, and checked it today.  I too have this same issue, and I believe that what you're describing is expected Outlook behavior.
<<Right now if someone sends an email to me, at jon@yahoo.com, and I respond to it, by default my response will be FROM the address jon@yahoo.com.>>
I also agree it's a pain to manually change the account, but that's what I do.  In fact, most times I want to reply FROM the account that the email was sent TO, so I don't have to change much.
Try the VBA pointer question, and good luck.
Rob
0
 
IvaSoftCommented:
Google for SetFrom utility.
Regards,
Victor
0
 
mlmccCommented:
Here is the link

http://www.ivasoft.biz/setfrom.shtml

mlmcc
0
 
David LeeCommented:
Hi, Ajw43022.

Here's a script based solution to this issue.  Follow these instructions to use it.  This works by checking each inspector window as it opens.  If the item in the window is a mail item and has not been sent, then the code sets it to be sent through the account of your choice.

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
5.  Outlook's VB Editor window
6.  Edit the code as needed.  I included comment lines wherever something needs to or can change
7.  Click the diskette icon on the toolbar to save the changes
8.  Close the VB Editor
9.  Click Tools > Macro > Security
10. Set the Security Level to Medium
11. Close Outlook
12. Start Outlook
13. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

Dim WithEvents olkInspectors As Outlook.Inspectors
Dim WithEvents olkInspector As Outlook.Inspector
 
Private Sub Application_Quit()
    Set olkInspectors = Nothing
End Sub
 
Private Sub Application_Startup()
    Set olkInspectors = Outlook.Application.Inspectors
End Sub
 
Private Sub olkInspector_Activate()
    If olkInspector.CurrentItem.Class = olMail Then
        If Not olkInspector.CurrentItem.Sent Then
            SetSendThroughAccount
            Set olkInspector = Nothing
        End If
    End If
End Sub
 
Private Sub olkInspectors_NewInspector(ByVal Inspector As Inspector)
    Set olkInspector = Inspector
End Sub
 
Private Sub SetSendThroughAccount()
    Dim olkSendThroughBtn As Object, _
        olkSendAccount As Object
    Set olkSendThroughBtn = olkInspector.CommandBars("Standard").Controls(3)
    'Change 3 on the next line to the index of the account you want to send through.'
    Set olkSendAccount = olkSendThroughBtn.Controls(3)
    olkSendAccount.Execute
End Sub

Open in new window

0
 
Ajw43022Author Commented:
Thanks for your response BlueDevil!  I finally had a chance to test it tonight, and I'm having some trouble with it though.  I followed your instructions for installing the code, and set the security setting, and saved and reopened outlook, but it doesn't seem to have an effect on anything.  Whether I change the number in the code to 1 to 2 to 3 to 4 or anything, the emails are sent from the same address they were before.  

Any idea why the code wouldn't be working?  Any chance that in addition to changing the number in the line below the commented line, that I'm also supposed to modify the one right above it?  It just has the same "Control(3)" which is why I ask that.
0
 
David LeeCommented:
"I'm also supposed to modify the one right above it?"
No, that 3 needs to stay as is.

The code works by simulating mouse clicks on certain toolbar items.  Line 28 simulates a click on the Account icon on the Standard toolbar.  Line 30 then simulates a click on the 3rd item on the accounts menu.  I don't have access to a computer with Outlook 2000 anymore so I built and tested this using Outlook 2003.  I haven't used 2000 in awhile, so I might be wrong in thinking that 2000 has an Account selection on the Standard toolbar.  Does it?
0
 
Ajw43022Author Commented:
It does -- it's labeled "Send" instead of "Account", but I wouldn't expect that to matter.

I  tested it on a copy of Outlook 2003 and I can't get it to work there either.  One suggestion on why it might not be working is that I don't know if simulating mouse clicks will work.  The thing is that the accounts listed in the "Account" ("Send") dropdown can change order, depending on which is the account it's defaulting to send from.  

Get what I'm saying?
0
 
David LeeCommented:
I've used the code before in other questions and it's always worked.  For Outlook 2003 simulating mouse clicks is the only means of doing this.  Outlook 2007 introduced a way of setting the sending account directly, but for 2003 and earlier simulating clicks is all we have to work with.  My first thought is that we aren't clicking the right buttons.  Let's test that theory.  Replace the subroutine SetSendThroughAccount with the version below.  Close and restart Outlook.  Test it again.  When you reply to an item the code should generate two popup dialog-boxes.  Both will show the name of the button being clicked.  The first popup should be display "Send" and the second should display the name of the third account listed under Send.  Let me know what happens.
Private Sub SetSendThroughAccount()
    Dim olkSendThroughBtn As Object, _
        olkSendAccount As Object
    Set olkSendThroughBtn = olkInspector.CommandBars("Standard").Controls(3)
    MsgBox olkSendThroughBtn.Caption
    'Change 3 on the next line to the index of the account you want to send through.'
    Set olkSendAccount = olkSendThroughBtn.Controls(3)
    MsgBox olkSendAccount.Caption
    olkSendAccount.Execute
End Sub

Open in new window

0
 
Ajw43022Author Commented:
Ok, the problem was that I was trying it out in Outlook 2003 because I didn't realize that'd make a difference.  Sorry about that.

When I try it using Outlook 2000 it works....well, sort of.  It does now send the email, and it sends it from the address I want it to, all of the time.  That is awesome.

BUT, it sends the email AS SOON AS I hit "new" or "reply".  It doesn't give me time to actually compose my email!  

So maybe one idea is that instead of having it run constantly during the Outlook session, perhaps a new send button could be created in the toolbar, and the code is run when it's pressed?

0
 
Ajw43022Author Commented:
Any ideas on this BlueDevilFan?  Thanks again for your help.
0
 
David LeeCommented:
"it sends the email AS SOON AS I hit "new" or "reply""
I don't know how that's possible.  The code does not contain any commands to cause a send.  Unless setting the send through account manually causes a send, then I don't see how the code could either.  It is only simulating the mouse clicks that would set the send through account manually.  Add to that the fact that I've used this basic code in a number of other questions and it hasn't caused a send.  I don't doubt that it is causing a send, I just cannot see how it's possible nor why it would on your system when it hasn't on any other system.  Are you using Word as your email editor?

Here's a revised version that will work from a toolbar button.  Are you familiar with adding a toolbar button that runs a macro?

Private Sub SetSendThroughAccount()
    Dim olkSendThroughBtn As Object, _
        olkSendAccount As Object
    Set olkSendThroughBtn = Application.ActiveInspector.CommandBars("Standard").Controls(3)
    'Change 3 on the next line to the index of the account you want to send through.'
    Set olkSendAccount = olkSendThroughBtn.Controls(3)
    olkSendAccount.Execute
    Application.ActiveInspector.CurrentItem.Send
End Sub

Open in new window

0
 
Ajw43022Author Commented:
"Unless setting the send through account manually causes a send, then I don't see how the code could either."

Ah ha.  This is why.  Outlook 2000 is different from Outlook 2003.  With 2003 the drop-down menu where you choose the account is separate from the "Send" button.  But in 2000 they are combined into one -- the Send button itself is a drop-down, so once you choose it, it automatically sends to that account.  

I'm familiar with adding a toolbar button that runs a macro.  I would need some guidance on how to structure the code however.  

thank you.
0
 
Ajw43022Author Commented:
BlueDevilFan, please don't forget about me!  I'll up the points to all I've got left -- 160.   I really need your help!   thanks.
0
 
David LeeCommented:
Sorry, I'm slow sometimes.

You don't need to up the points.  I'm not clear on what you mean when you say "guidance on how to structure the code".  I provided the code.  What is there to structure?  Do you mean change the code to handle how the button works in 2000?  If so, then I don't know how I can help.  I don't have a copy of 2000 anymore.  That makes it difficult to work out the details.

0
 
Ajw43022Author Commented:
Thanks for your response.  I don't need you to change the code to handle how the button works in 2000.  I'll create a new button on the toolbar, use that to trigger the code, and I think that should work fine.  

But,  although I know how to create the toolbar button, and link it to a macro, I'm not sure exactly how the code should look.  I know you provided code, but I assume it would have to be modified slightly when used as a toolbar triggered macro (Module), rather than a ThisOutlookSession macro.  And I'm just not sure how to make those slight modifications.  You know?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.