Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    I am using Corporate-Workgroup install. I would like to create a macro (or whatever) that goes into Tools / Services / Delivery and highlights the second service (e-mail account) and moves it up to be the first account. AAAAAAAaaaaaaaaaaaaaaaaaaaaaaaaaa! I cannot figure out how to do this.

    I want to then assign this to a button on the toolbar, so that I can have the "From" and "Reply to" be appropriate, depending on whether the e-mail is from me personally, or me acting as president of the company. There must be a better way...
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    The Outlook object model doesn't let you write to the From field, I don't think, so a macro solution seems unlikely. Maybe it can be done with extended MAPI? That's uncharted territory for me.

    The slow, non-programmatic way is to create a second profile that contains all the same services as the first but your personal From name and address, then shut down and restart Outlook in the relevant profile. Not useful if you need to do this more than twice a day...

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    Hmmm, on second thought: are you saying that if you manually change the sequence under the heading "Recipient addresses are processed by these information services in the following order" that it also uses the associated From and Reply-to information? I did not know that. (And I can't seem to make it work for me in a little test.)

    Crude as it is, your workaround might be to use SendKeys to do what you could do interactively with the keyboard:

    Tools: Alt+T
    Services: v
    Switch to Delivery tab: Ctrl+Tab
    Move selection to second control: Tab
    Select second account: DownArrow
    Highlight up button: Tab
    Click the button: Space
    Close/OK the dialog: Enter

    I haven't coded this up, but if you search the help for SendKeys you can find the strings needed to emulate these keys. Hope it works!

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    Thanks. I tried the multi-profile idea for several years now, and it just SUCKS. When you copy, or even re-create from scratch, the same e-mail accounts in multiple profiles, it just screws up the PST file to the point that once a year (almost like clockwork) you have to just wipe and reload from scratch. Also, the hassle of going out and coming back in, just to reply to an e-mail and have the correct FROM / REPLY-TO in the header was just silly.

    Glad that I wasn't missing something obvious. Thanks for the reply.
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    Wow. I hadn't heard of Sendkeys. That sounds like what I might need, because it would work in many more situations that I'm trying to use Outlook for. Thanks!

    (Unfortunately, I will probably end up one of the first CRM customers for Microsoft. I recognize that I'm pushing Outlook to the limit, in ways that shouldn't be limited! How hard would it be to just have a silly pull-down menu for the "From" field, that when you select the appropriate From, it assigns the appropriate Reply-to, etc. headers.... Grrrrrrrrrrr.)
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    I assume you have a real need for CW mode. The Internet Mail Only mode does have a drop-down on the Send button to send through a different account. In OL2002, they combined the modes; I don't know what happened to the Send button drop-down functionality. (I'm sure if it went away someone has complained here!)

  7. #7
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    When I occasionally need to send mail (or reply) from one of my alternate email accounts I manually change the "From" and "Have replies sent to:" fields just for that instance. My primary email account remains the default so there's no need to remember to undo the change afterwards. Doing it this way, the "From" field displays as "From: <main account> on behalf of <alternate account>", which may (not) be desirable in your situation.

    Although I do it manually, you should be able to automate the steps, at least with SendKeys, if not a more direct/proper route. The macro would be a single click access on the message toolbar (if you hardcode the names).

    The (manual) steps are:
    <UL><LI>(If the "From" field is hidden) View|select "From Field"
    <LI>Enter the alternate name in "From" field (manually, or via the "From
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  8. #8
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    Wow. Thank you very much for pointing this out. This is exactly what I was looking for, and you are correct, I do not need C/W mode as I thought. I had switched to that years ago for some reason (of course, I have no idea any more...was it for MAPI to ACT or something????). I just switched to Email only. I do have several different accounts for personal vs. business, and my heart stopped when only the one account got checked after the switch. Seems that going from C/W to "plain" mode means you have to delete and recreate all of the accounts to get them to work. Not a big deal, just posting this here in case anybody else has that happen.
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

  9. #9
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Chicago, Illinois, USA
    Posts
    177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook VBA to switch delivery service used (Outlook 2000 SP3)

    Thanks. However I am stuck with frequently (rather than occassionally) switching. I tried your approach for a while, but figured there had to be a better way. Turns out switching out of Corporate/Workgroup mode back to plain Internet Mail mode did the trick. A simple solution that I would not have thought of in a million years.
    <font color=blue>Eric A. Spanitz</font color=blue>
    Quality, Project, Management * Training * Consulting
    http://www.spanitz.com * http://www.synergest.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •