PDA

View Full Version : Solved: Managing MsgBox Windows in Outlook



MWE
04-13-2010, 07:59 AM
I am running ol2003. To the best of my knowledge, the display from the MsgBox function is always on top of other windows of the calling application. However, in Outlook, that does not appear to be true.

I have a MailItem Scan routine that is called by the Application_ItemSend procedure. The routine examines the MaiItem for mistakes I might have made (like not including an attachment referenced in the body, forgetting that it is now 2010 and not 2009, including recipients twice, etc). The routine checks for those things and then puts out a Msgbox display to which the user can indicate that things are OK or to not Send the Item. The Msgbox display is always behind the window displaying the current maiitem, so I have to minimize current MailItem window to see the Msgbox window. How can I force the Msgbox display to be on top of the current window?

Thanks

JP2112
04-23-2010, 10:07 AM
Do any of these help?

http://www.tek-tips.com/faqs.cfm?fid=4699
http://support.microsoft.com/kb/180936
http://allapi.mentalis.org/apilist/SetWindowPos.shtml

MWE
04-24-2010, 03:39 PM
Do any of these help?

http://www.tek-tips.com/faqs.cfm?fid=4699
http://support.microsoft.com/kb/180936
http://allapi.mentalis.org/apilist/SetWindowPos.shtml Thanks for the reply. At first I thought that the first link had supplied me with the clue that I needed, i.e., using vbModeless. Since the original post, I switched to a userform, so showing the form with vbModeLess was easy. That solves the "on top" problem but introduces another problem: the calling appl does not pause and does not "respond" to the arguements passed back.

I will look at the other links and see what I can find.

I think I will close this thread and open a new on focused on UserForms.