More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

forum 24-May-2018 19:51

Looking for help with Outlook programming projects — VSTO, add-ins, VBA, custom Outlook forms, etc.? You′ve come to the right place!

NEW! >> Subscribe to this site via RSS. For more RSS options, see the complete list of feeds on our main news page.

    Page [ 1 ]  
 Code Essentials Printer Friendly Version
Beginner’s section on how to work in the VBA environment, how to work with functions and expressions – generally not specific to Outlook
How to bring a msgbox to the front

I am using a msgbox in the application_itemsend. It works so that when a user sends an email without a number in the subject it pops up and tells them if they still want to send.
The problem is that the msgbox pops up behind the email window, infront of the inbox window. How can I make the msgbox be in front of all other windows?

thank you.


  02-Jun-2008  20:07
  02-Jun-2008  22:17   
Try setting the Context parameter (the last parameter) of your MsgBox call to VbMsgBoxSetForeground.

Or maybe minimize the ActiveExplorer window before the send and restore it afterwards.
  02-Jun-2008  22:39   
used the + vbMsgBoxSetForeground - worked great. cheers.
    Page [ 1 ]