Thursday, November 9, 2017

Skype for Business / Lync 2013 Outlook Properties Dialog Implementation

Since the advent of Office 2013, I've been increasingly frustrated with the new Outlook contact cards, and the round-about way needed to access the legacy GAL properties dialog as shown below:


After a ton of research, I discovered it's possible to add custom context menus within the Lync 2013 / Skype for Business client, as per this page from Microsoft.  From here, I needed to discover the API necessary to actually launch the legacy GAL properties dialog box.  Doing a bit of research, I simply could not find an easy way to do this, the only thing I was coming across was the following registry key, which just launched the GAL properties box from within Outlook:

HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\common\contactcard
DWORD: TurnOnLegacyGALDialog
Value: 1 (enable)

Nearly giving up after hours of digging through the API and searching, I was provided some help via Dmitry Streblechenko on StackOverflow (thank you, Dmitry!).

In the end, I ended up with a simple VBS and registry key:

LaunchGALProperties.vbs
If WScript.Arguments.Count = 2 Then
                Dim objOutlook : Set objOutlook = CreateObject("Outlook.Application")
                Dim objNamespace : Set objNamespace = objOutlook.GetNamespace("MAPI")
               
                objNamespace.CreateRecipient(WScript.Arguments(1)).AddressEntry.Details()
               
                Set objOutlook = Nothing
                Set objNamespace = Nothing
End If


LaunchGALProperties.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Lync\SessionManager\Apps\{4C13AA00-01F0-428C-B582-38E4F726D97E}]
"Name"="Outlook Properties"
"ApplicationType"=dword:00000000
"SessionType"=dword:00000000
"ExtensibleMenu"="ConversationWindowRightClick;MainWindowRightClick;MainWindowActions;ConversationWindowActions;ContactCardMenu"
"ApplicationInstallPath"="C:\\\\windows\\\\System32\\\\wscript.exe"
"Path"="C:\\\\windows\\\\System32\\\\wscript.exe C:\\\\temp\\\\LaunchGALProp\\\\LaunchGALProperties.vbs \"%user-id%\" \"%contact-id%\""
 
Boom!  After restarting Skype for Business, I was treated with the following view:


It's quite unfortunate that Microsoft removed this functionality within the newer versions of the Lync/Skype clients, but at least with a little bit of elbow grease I was able to recover it...for now.

No comments:

Post a Comment