MsgBox Hidden

G

Guest

I have recently upgraded from Office 2000 to 2003.
I have an ItemSend event handler that reminds me to attach attachments and
fill in the summary line if I click send without doing so. At Office2000, the
MsgBox used always to appear "on top of " the window containing the mail
item. In Outlook 2003 the MsgBox is now put "underneath" this window leaving
me thinking my system has frozen. Is there any way to force a MsgBox to the
"top of the pile"?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...38415&dg=microsoft.public.outlook.program_vba
 
G

Guest

Eric, thanks for the reply. It will probably help sort out my next problem!
Shortly after I posted the query, I found the WindowState property of the
Inspector object. So before calling the MsgBox function I set
ActiveInspector.WindowState = olMinimised. This worked fine and I could see
the MsgBox dialog box OK. All I had to do then was restore the
ActiveInspector on receipt of the yes/no response. olHelp says nothing about
the possible values for WindowState beyond admitting their existence.
olMaximised and olMinimised are self explanatory, leaving me to guess at the
meaning of olNormalWindow. I chose to assume its use would Restore the
ActiveInspector to its position prior to minimization. It didn’t. There was a
flicker as the ActiveInspector climbed out of the task bar, flew up the
olExplorer window and disappeared off the top of the screen. The next time I
clicked the New button on the explorer, I got a minimized Inspector in the
top left hand corner of the screen. At which point I set the recovery
WindowState to olMaximised and waited for a (your) response.
 
G

Guest

I don't envy your position at all. I had to deal with controlling Inspector
windows very thoroughly and during many events when I built my Picture
Attachments Wizard add-in. It wasn't fun, and I had to test a great many
implementations before I found an acceptable solution (which usually involved
timers).

Anyway, in your case I think the best approach would be to use the relevant
Win32 API call to get a handle to your dialog via it's Window Title, and
ensure that it is at the foreground after you display it. If the Inspector
insists on displaying over top of it, use a timer to fire after
Inspector_Activate maybe. You may also want to consider designing a UserForm
to mimic the Message Box, and open it modally.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top