Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    May 2002
    Location
    Wistow, North Yorkshire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple Accounts Macro (2002 SR1)

    I have searched the outlook posts and found many simular posts but nothing about using a macro to solve the problem.

    I have 2 ISP's 1 work and personal. I do not want to send personal emails through work as all email is monitored, If I send work emails throuh my personal account in many cases it gets deleted by the receiver( company wide fear of viruses most users computer iliterate) with out being looked at.
    I often forget to select which account to use until after the email has gone and then it is too late!!
    Would it be possible to write a macro / VBA and attach it to a toolbar button which rather than just send would offer the choice of account to use and then after the account was selected send the email

    Any help, where to start, a working macro or a link to helpful sites will be very welcome

  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: Multiple Accounts Macro (2002 SR1)

    That wasn't possible in Outlook 2000, but it might be possible in XP. I'll also be interested in hearing if that feature has been added.

  3. #3
    New Lounger
    Join Date
    May 2002
    Location
    Wistow, North Yorkshire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Accounts Macro (2002 SR1)

    I am using 2002 XP and it is not possible (as far as I can tell) to make outlook ask but you can attach command buttons to the toolbar.

    I have had 2 thoughts

    1) Write a macro / VBA and attach it to a toolbar button which rather than just send would offer the choice of account to use and then after the account was selected send the email

    2) Is it possible to create amessage form that always uses a particular account to send?

    Any thoughts

  4. #4
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Accounts Macro (2002 SR1)

    A quick test shows this appears to work, but may not suit you:

    Open a new message
    Select the account it is to be sent from
    Save the message and close it.

    The message now appears in your inbox as a blank message. Left-click-and-hold and drag it onto your desktop, where it will appear as "untitled.msg". Right-click it, select Rename, and call it (eg) "personal.msg".
    Delete the original from your Inbox.

    Double-clicking the desktop icon will now open up a new blank message and although it doesn't give the usual yellow-banner-notice of "This message will be sent via Accountname", it does appear to remember which account you had picked.

  5. #5
    New Lounger
    Join Date
    May 2002
    Location
    Wistow, North Yorkshire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Accounts Macro (2002 SR1)

    Thanks Leif

    Not quite what I wanted but it will go some way to solving my problem

  6. #6
    New Lounger
    Join Date
    May 2002
    Location
    Wistow, North Yorkshire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Accounts Macro (2002 SR1)

    Getting Closer

    Using Leif's starter I saved the message as an outlook template and wrote a short macro that opened the template as a new message and then put a Work Message button on the toolbar next to the "New" button and it works as I want it to. As Leif said the template remembers which account the message is to use.

  7. #7
    Star Lounger
    Join Date
    Sep 2001
    Location
    Bangkok, Thailand
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Accounts Macro (2002 SR1)

    Graham,



    I too have need to access multiple send accounts and it's a bleeding pain working through Outlooks convoluted e-mail account wizard to reset the "default" account.

    Unfortunately I don't have the necessary Outlook macro/VBA skills to write my own macro for this purpose, so ...

    Please post details of your Macro.

  8. #8
    New Lounger
    Join Date
    May 2002
    Location
    Wistow, North Yorkshire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Accounts Macro (2002 SR1)

    Follow Leifs instructions save the message as an outlook template in a safe place, assign the macro to the toolbar and give it a button image. I did tis for the 3 accounts I use and then removed the "New" button from the toolbar. Most of the time it works fine but if another application starts outlook then the default account is used. I also send reports to head office and I created a template which picks up the report name and adds the date.

    The following code I found and adapted and may have surplus elements but it works for me
    Public Sub AccountName()
    Dim objOutlook As Outlook.Application
    Dim objForm As Outlook.MailItem
    Mydate = Format(Date, "Long Date")
    On Error Resume Next
    Set objOutlook = CreateObject("Outlook.Application")
    Set objForm = objOutlook.CreateItemFromTemplate("Path to message template")
    objForm.Subject = "Report Name" + Mydate Puts this text into the subject line
    objForm.Display
    Set objForm = Nothing
    Set objOutlook = Nothing
    End Sub

Posting Permissions

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