Open the Outlook Address Book from a Desktop shortcut

Address Book buttonAlthough you can create Outlook Desktop shortcuts to specific folders within Outlook, there is no command line switch to directly open the Outlook Address Book.

Especially in a corporate environment, having such a shortcut can be quite handy to quickly look up a contact in your Contacts folder or a colleague in the Global Address List (GAL).

Luckily, with a small vbs-script we can still recreate this “rolodex experience”.


VBS: Open Outlook Address Book

VBS Script buttonThis vbs-script is a very basic script that detects your Outlook session or starts Outlook when needed. It then uses a programmatic method (GetSelectNamesDialog) to open the Address Book.

The Address Book dialog can be closed by either clicking the OK or Cancel button, the Close button in the top-right corner or by double-clicking on any contact.

Contact details can be viewed by right clicking on the contact and choosing Properties.

Quick Install

How? buttonUse the following instructions to use the vbs-script;

  1. Download the file; openaddressbook.zip
  2. Open or extract the zip-file, and double click on; OpenOutlookAddressBook.vbs
  3. You may need to click on Outlook in the Taskbar to see the “Address Book” dialog.

Optionally, you can customize the icon for the script in the following way.

  1. Place the vbs-file in a convenient location such as C:\Scripts or \Documents\Scripts.
  2. Right click the file and choose; Send to-> Desktop (create shortcut)
  3. Right click the shortcut on your Desktop-> Properties-> tab: Shortcut-> button: Change Icon…
  4. Select an icon of your liking. Example icons are also included in the Icons folder within the zip-file.

VBS code for reference

The following code is contained in the zip-file referenced in the Quick Install. You can use the code below for review or manual creation of the vbs-file.

'======================================================================
'Description: VBS Script to open the Outlook Address Book.
'
'author : Robert Sparnaaij
'version: 1.0
'website: https://www.howto-outlook.com/howto/address-book-shortcut.htm
'======================================================================

On Error Resume Next
Dim objOutlook, oDialog
Set objOutlook = CreateObject("Outlook.Application")
Set oDialog = objOutlook.Session.GetSelectNamesDialog

If Err.Number = -2147467260 Then
	'Outlook needs a bit more time to start. Increase if needed.
	WScript.Sleep (500)
	Set oDialog = objOutlook.Session.GetSelectNamesDialog
	Err.Clear
End If

oDialog.NumberOfRecipientSelectors = olShowNone
oDialog.Display

Set oDialog = Nothing
Set objOutlook = Nothing

Troubleshooting

Troubleshoot buttonThe script works out of the box but there are 3 things to be aware of;

  • The Address Book may not take the foreground. In that case, select the main Outlook window on your Taskbar to see it.
  • The Address Book dialog is being opened in as a modal dialog. This means that the dialog blocks access to any other Outlook window until the Address Book dialog has been closed.
  • The script works regardless of whether Outlook is already running or not. If the Address Book doesn’t open when Outlook is closed, then increase the value in the following line;
    WScript.Sleep (500)
    This is the amount of time in milliseconds before it attempts to open the dialog again. If Outlook needs longer to load on your computer, increase it to for instance 1000 (1 seconds) or 2000 (2 seconds). If it works then, you can fine-tune the delay by decreasing it with steps of 100 milliseconds.