weirdbeardmt
02-27-2006, 09:47 AM
Hi everyone,
I am trying to add a little checking on our Exchange server. The situation is this:
1) When a user creates a new email, I want to check the subject of the email to see if they've entered a particular phrase in there.
2) If they haven't, then I pop up an Inputbox and say "Are you sure you don't want to add this to your subject?"
3) They either click OK or Cancel - either way the mail gets sent.
Actually, this part of the code is fine - it's all sorted (i.e. intercepting the Send event) - the only problem I have is that when the inputbox pops up (same with a msgbox) then the box is BEHIND the mail message window (because it has come from the main Outlook application, not the mail window). The only way I've been able to get the msgbox on top of the mail window is to show the box like this:
VBA:
msgbox "Something here?", vbSystemModal
VBA tags courtesy of www.thecodenet.com (http://www.thecodenet.com)
but that's no good because it only gives you an OK button. So is there anyway of getting this input box to show on the top? Either minimise the mail window, or bring the Outlook application to the front or something...
We're using Outlook 2003 SP2.
Any ideas? :)
Matt
I am trying to add a little checking on our Exchange server. The situation is this:
1) When a user creates a new email, I want to check the subject of the email to see if they've entered a particular phrase in there.
2) If they haven't, then I pop up an Inputbox and say "Are you sure you don't want to add this to your subject?"
3) They either click OK or Cancel - either way the mail gets sent.
Actually, this part of the code is fine - it's all sorted (i.e. intercepting the Send event) - the only problem I have is that when the inputbox pops up (same with a msgbox) then the box is BEHIND the mail message window (because it has come from the main Outlook application, not the mail window). The only way I've been able to get the msgbox on top of the mail window is to show the box like this:
VBA:
msgbox "Something here?", vbSystemModal
VBA tags courtesy of www.thecodenet.com (http://www.thecodenet.com)
but that's no good because it only gives you an OK button. So is there anyway of getting this input box to show on the top? Either minimise the mail window, or bring the Outlook application to the front or something...
We're using Outlook 2003 SP2.
Any ideas? :)
Matt