I have Outlook open all day at work. It's on my second monitor. But it's covering up the whole screen. All I really need to see is a list of recent e-mails and be able to view them when needed. I decided to look into putting Windows' built-in Active Desktop to see if it would work. I'm a webdeveloper by trade, so I figured using the active web content feature of Active Desktop would be my best bet. I knew that Outlook had an outlook: protocol to link to things like the Inbox (outlook:Inbox). I did some digging and discovered you can link to individual messages in your inbox. This was my key.
I've got a background in VB coding, so the built-in VB editor of Outlook made things easy. I wrote a module that would look at the 20 most recent e-mails, save the list and save the list to an HTML file. That HTML file would use JavaScript to automatically refresh itself so the displayed content would always be current.
I set up a Rule in Outlook for every single mail that comes in, it runs the VB script I wrote. I had to disable all the macro security so Outlook wouldn't freak out every time new mail came in, but that was a compromise I was willing to take.
Here's how it'll look. Obviously you can change the HTML to make it match your desktop. And your sensitive information won't be blurred out either.
Earlier versions of Outlook (pre-2007) have the outlook: protocol enabled by default. 2007 doesn't, I suspect for security reasons. So to get this going, step one is, if you have Outlook 2007, you need to edit the registry. I'll assume you already know how to do this, so here's the Keys you need to create:
The italicized items are string values. Regular text are Keys. Change the path to Outlook to match your installation location.
The hard part is over! Download this ZIP file that contains the files needed to complete this. Extract them to the root of your C:\ folder. If you don't mind editing the VB code, you can extract these files anywhere and modify the paths in the VB code to match.
Now, go to Outlook. Click Tools-Macro-Visual Basic Editor. In the VB Editor, click File-Import File… and find the outlook.bas file from the ZIP file. If you extracted the files to a folder other than C:\, go ahead and edit the VB code. When you're done, save the code and then select Compile from the Debug menu. Exit the VB Editor.
Now that the VB code is set up and the files are unzipped, we need to set up a rule in Outlook. Click Tools-Rules and Alerts… and click the New Rule button. Select the second-from-the-bottom item that says "Check messages when they arrive." Click Next. We want to check EVERY incoming message, so leave all the boxes blank and click Next again. Answer Yes to the dialog box that pops up. In the list, check the box next to "run a script." In the bottom text area, click the "a script" link. Select the saveMsgToWebPage script. It should be the only one in the list. Click OK and then click Next and then click Next a second time since we have no exceptions. Name the rule something recognizable to you and click Finish.
Now that your work in Outlook is done, we need to display the HTML file on your desktop! Right click on an empty area of your desktop and click Properties. Go to the Desktop tab and click the Customize Desktop button. Go to the Web tab and click the New button. Click the Browse button and find the outlook.htm file. Click OK and OK and OK and you should see your web page on your desktop! Move it and resize it how you'd like. It may have no e-mail listed. It won't until a new e-mail comes in in Outlook.
You can edit the HTML file however you'd like, just be sure to leave the BODY tag alone as well as the <!-- msg --> and <!-- /msg --> tags as well. These are necessary to the operation of the script. Also leave the options section alone, unless you need to change a value. Do not delete any options!
Feel free to post any questions in the comments!
I've got a background in VB coding, so the built-in VB editor of Outlook made things easy. I wrote a module that would look at the 20 most recent e-mails, save the list and save the list to an HTML file. That HTML file would use JavaScript to automatically refresh itself so the displayed content would always be current.
I set up a Rule in Outlook for every single mail that comes in, it runs the VB script I wrote. I had to disable all the macro security so Outlook wouldn't freak out every time new mail came in, but that was a compromise I was willing to take.
Here's how it'll look. Obviously you can change the HTML to make it match your desktop. And your sensitive information won't be blurred out either.
Earlier versions of Outlook (pre-2007) have the outlook: protocol enabled by default. 2007 doesn't, I suspect for security reasons. So to get this going, step one is, if you have Outlook 2007, you need to edit the registry. I'll assume you already know how to do this, so here's the Keys you need to create:
- HKEY_CLASSES_ROOT
- outlook
- (Default)="URL:Outlook Folders"
- URL Protocol=""
- DefaultIcon
- shell
- open
- command
- (Default)="C:\PROGRA~1\MICROS~2\OFFICE12\OUTLOOK.EXE /select "%1""
The italicized items are string values. Regular text are Keys. Change the path to Outlook to match your installation location.
The hard part is over! Download this ZIP file that contains the files needed to complete this. Extract them to the root of your C:\ folder. If you don't mind editing the VB code, you can extract these files anywhere and modify the paths in the VB code to match.
Now, go to Outlook. Click Tools-Macro-Visual Basic Editor. In the VB Editor, click File-Import File… and find the outlook.bas file from the ZIP file. If you extracted the files to a folder other than C:\, go ahead and edit the VB code. When you're done, save the code and then select Compile from the Debug menu. Exit the VB Editor.
Now that the VB code is set up and the files are unzipped, we need to set up a rule in Outlook. Click Tools-Rules and Alerts… and click the New Rule button. Select the second-from-the-bottom item that says "Check messages when they arrive." Click Next. We want to check EVERY incoming message, so leave all the boxes blank and click Next again. Answer Yes to the dialog box that pops up. In the list, check the box next to "run a script." In the bottom text area, click the "a script" link. Select the saveMsgToWebPage script. It should be the only one in the list. Click OK and then click Next and then click Next a second time since we have no exceptions. Name the rule something recognizable to you and click Finish.
Now that your work in Outlook is done, we need to display the HTML file on your desktop! Right click on an empty area of your desktop and click Properties. Go to the Desktop tab and click the Customize Desktop button. Go to the Web tab and click the New button. Click the Browse button and find the outlook.htm file. Click OK and OK and OK and you should see your web page on your desktop! Move it and resize it how you'd like. It may have no e-mail listed. It won't until a new e-mail comes in in Outlook.
You can edit the HTML file however you'd like, just be sure to leave the BODY tag alone as well as the <!-- msg --> and <!-- /msg --> tags as well. These are necessary to the operation of the script. Also leave the options section alone, unless you need to change a value. Do not delete any options!
Feel free to post any questions in the comments!