Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pop up Outlook account selection

Posted on 2009-05-11
14
Medium Priority
?
488 Views
Last Modified: 2012-05-06
I have an odd situation which I hope someone can be of assistance. My company is running outlook 2003 popping to our email provider. All of the outlook clients have 2 email accounts; the problem is that a grate number of employees are sending out forwards and new email messages through the wrong account. Is there a plug-in or app that will pop up the account selection when a new or forwarded email is generated forcing them to select the right one?  
0
Comment
Question by:skull52
[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
  • 7
  • 6
14 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 24356967
Hi, skull52.

I don't think you can "force" them select the right account.  Even if you display a popup they could still select the wrong account.  If instead you want them to think about the account they're sending through, then I can provide some code that will display a reminder for each item sent.  I'd just need to know the version of Outlook they are using.
0
 

Author Comment

by:skull52
ID: 24357056
That is precisely what I want them to do and and a reminder would work just fine. We are using Outlook 2003
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24357427
The code in the snippet displays a generic question asking if the sender selected the correct account.  If they answer "yes", then the message is sent.  If they answer "no", then the message is not sent.  Follow these instructions to use this.

1.  Open Outlook.
2.  Click Tools->Macro->Visual Basic Editor
3.  If it's not already expanded, then expand Microsoft Outlook Objects.
4.  Once expanded you should see ThisOutlookSession.  Click on it.
5.  Copy the code from the snippet and paste it into the right-hand code window.
6.  Edit the code as needed.  I placed a comment line where things can/should change.
7.  Exit the editor.  It'll save everything automatically.
8.  Click Tools->Macro->Security.
9. Set the security level to Medium.
10. Close Outlook.
11. Launch Outlook.
12. When Outlook starts you'll receive a pop up dialog-box warning that ThisOutlookSession contains macros and asking if you want to enable them.  You have to say yes and enable them for the code to work.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    'Edit the prompt and caption as desired.'
    If MsgBox("Did you select the correct account to send through?", vbQuestion + vbYesNo, "Account Check") = vbYes Then
        Cancel = False
    Else
        Cancel = True
    End If
End Sub

Open in new window

0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

Author Comment

by:skull52
ID: 24357697
The code seems to work but it pops up under the message and you don't see it untill you go back to the inbox view, is there a way to make it pop up on the mesage that is being composed
0
 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 24357788
It pops up when the item is sent.  If you want it to pop up over anything else, then use the version below.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If MsgBox("Did you select the correct account to send through?", vbSystemModal + vbQuestion + vbYesNo, "Account Check") = vbYes Then
        Cancel = False
    Else
        Cancel = True
    End If
End Sub

Open in new window

0
 

Author Comment

by:skull52
ID: 24357974
The last version drops you back to the inbox when send is clicked, I hate to be a pain but what I would like to happen is when you click send, the message box pops up over the message that was just composed, neither version of the code does that.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24358083
"what I would like to happen is when you click send, the message box pops up over the message that was just composed"

Which is exactly what happens with the second version when I use it.
0
 

Author Comment

by:skull52
ID: 24358116
When I click Yes or No it losses focus from the email and goes to the inbox
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24359599
When you click "Yes" the message should disappear because the message has been sent.  When you click "no" focus should return to the message.
0
 

Author Comment

by:skull52
ID: 24363722
When you click YES the popup does dissappear and send the message, but when you click NO it also dissapears but does not take you back to the message, still sits at the inbox.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24363829
You must be using Word as your email editor.  Word messes up a lot of things in Outlook, including how macros behave.  I understand its benefits, but in my opinion it causes more problems than it's worth.  This is one of them.  If you switch the editor to Outlook, then you'll get the behavior you want.  I can't change the way Outlook behaves with Word as the editor.  
0
 

Author Comment

by:skull52
ID: 24363903
Yep, that would be the problem, as soon as I unchecked use Word it functioned as designed. Thanks for your help Blue
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24363977
You're welcome.  I should have thought of the Word angle sooner.
0
 
LVL 6

Expert Comment

by:MikeGGG
ID: 24364016
Why you don't want let users select which mail profil they want to use, directly by start Outlook?
Control Panel -> Mail -> Profil ?
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

670 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