Click here to Skip to main content
13,863,289 members
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

6.2K views
109 downloads
3 bookmarked
Posted 9 Dec 2015
Licenced CPOL

Make Outlook E-mail and Appointment Alerts 'top most'

, 16 Dec 2015
Rate this:
Please Sign up or sign in to vote.
Use this if you're working in a fullscreen RDP session - for example - to see new e-mail or appointment alerts

Introduction

I've been working in fullscreen RDP sessions recently and miss having Outlook tell me when I've received e-mails or when the Friday afternoon pub session is about to start.

Background

I had assumed that a quick call to SetWindowPos in response to a ThisOutlookSession event would suffice.

Wrong! :(

The events occurs BEFORE the window has been created and displayed so the tricky part here is to use Windows timers to wait a while before executing the SetWindowPos call.

Using the Code

  • Open Outlook
  • Open the VBA IDE (Alt-F11)
  • Unzip the attached file to import the class, module and form definitions
  • You will now have an extra 'ThisOutlookSession' class under 'Class Modules'
    Move/merge the code in there into the 'ThisOutlookSession' class definition under 'Microsoft Office Outlook Objects'
  • Your project should now look something like this:

Enable the 'New Mail Alerts' Dialog

Now, you have all the code you need to ensure that you're getting e-mail alerts.

For example:

  • In Outlook 2013, look under 'File' for 'Rules and Alerts':

  • Check that the 'New Mail' rules is enabled:

  • ... or create a rule that displays the 'New mail' window when required.

Self Certification

Because you've added code to the Outlook Session, you will now be prompted to enable macros each time you run Outlook:

To overcome this, you could create a certificate for your workstation and sign your VBA project with it.

See http://www.howto-outlook.com/howto/selfcert.htm.

Points of Interest

The mdlExecutor module is an example of a generic way to fire 'actions' after a period of time using the TAction class.

IAction is the interface used by the mdlExecutor module and TMakeTopmostAction is a simple example of how it's possible to define an interface (in this case IAction) and implement it elsewhere.

History

  • v0.1: Initial draft
  • v0.2: Corrected image urls
  • v0.3: Only change the alert Window's style if it needs changing
    NOTE: Mail alert windows seem to perisist while appointment windows are re-created.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

maxitone
Software Developer
United Kingdom United Kingdom
No Biography provided

You may also be interested in...

Comments and Discussions

 
QuestionNo images? Pin
Uwe Keim9-Dec-15 21:56
sitebuilderUwe Keim9-Dec-15 21:56 
GeneralRe: No images? Pin
maxitone9-Dec-15 22:41
membermaxitone9-Dec-15 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web02 | 2.8.190214.1 | Last Updated 17 Dec 2015
Article Copyright 2015 by maxitone
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid