Wednesday, April 18, 2012

How to Have Your Lenovo Thinkpad’s ThinkLight Blink When New Mail Arrives in MS Outlook 2010


Thinkpad’s ship with a hardware feature called “ThinkLight” which is a LED light which illuminates the keyboard during low light conditions.  This light is somewhat bright and can catch your attention which is why you may want to enable this for new messages that arrive in Outlook.  The following post will guide you on how to enable this in Outlook.  This has only been tested on a Lenovo ThinkPad T520 with MS Outlook 2010 and Windows 7.  If you have any issues enabling this function please post your issue in the comments and I will try to help you along if I can.

First, you will need a command line utility called “ThinkLight.exe” from Arkadiusz Wahlig.  You can download from http://sites.google.com/site/filesarkadiuszwahlig/ThinkLight.exe?attredirects=0 you can save the exe file anywhere on your local system but for simplicity I recommend the root of your C drive.

Second, in Outlook you will need to enable the “Developer” ribbon.  To do this select the “File” button on the upper left corner of the window then “Options”.  From the “Outlook Options” window select “Customize Ribbon” and check the “Developer” box under “Main Tabs” and then select “OK” and “File” again.

Third, now you need to setup a VBA script to blink your ThinkLight.  To start select the “Developer” ribbon then “Marcos” selecting “Marcos”.  For “Marcos” name enter “temp” or something similar as we will delete this soon then select “Create”.  A new window will appear with text similar to:
Sub temp()

End Sub

Now delete all text replace with:
Sub ThinkLight(Item As Outlook.MailItem)
   Shell "C:\ThinkLight.exe blink 1"
End Sub

If “ThinkLight.exe” is not in the root of the C drive change “C:\ThinkLight.exe” to reflect the correct file path.   Now go to “File” and “Save” then “File” and “Close and Return to Microsoft
Outlook”
                        Fourth, an Outlook rule to process all incoming emails and run the macro is needed.  To do this go to “File” from the main screen then “Manage Rules and Alerts” then select “New Rule”.  Within the rule wizard use the "Apply rule on messages I receive" template and press “Next >”.  On the next screen select the “on this computer” checkbox and select “Next >”.  On the next screen select “run a script” checkbox and below on the “Step 2” box click on “a script” and select the script that was just created and select “OK” and “Next >” on the wizard window.  On the next screen select and enter a rule name and the “Turn on this rule” checkbox and select “Finish” and then “OK”.

                        Lastly we need to enable macros with Outlook.  From the main screen go to the “Developer” ribbon and select the “Macro Security” option.  Within the new window select “Enable all macros”.