none
Prerequisites in Office for IM Application Integration RRS feed

  • Question

  • Hello, I have successully implemented an IM application integration for Office, following the documentation:

    "Integrating IM applications with Office" (https://msdn.microsoft.com/en-us/library/office/jj900715.aspx)

    On machines running Office 2013 Professional incl. Lync, it runs out of the box. On machines running Office 2016 Professional, it works as well.

    But when our software is installed on a machine with Office 2013 Standard (without Lync / Skype), the integration does not work. I don't find the relevant dlls in the Office program files folder, Office does not invoke the interfaces of the UCCollaborationLib.

    Question: What are the requirements for Office for enabling this feature? Is there any redistributable that I could include in the installer?

    The documentation only reads: "The APIs for this integration are included in the UCCollborationLib namespace that is contained in the Microsoft.Office.UC.dll file, which is installed with certain versions of Office 2013."

    Wolfgang


    • Edited by WWall Thursday, January 28, 2016 7:23 AM
    Thursday, January 28, 2016 7:23 AM

All replies

  • Hi Wolfgang,

    >>Question: What are the requirements for Office for enabling this feature? Is there any redistributable that I could include in the installer?<<

    As far as I know, we can download the Microsoft Lync 2013 SDK which include the Microsoft.Office.Uc.dll file from link below:
    https://www.microsoft.com/en-us/download/details.aspx?id=36824

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 29, 2016 2:55 AM
    Moderator
  • Hi Fei,

    thanks for your reply. Of course. I'm installing that dll along with my application. This is not the point of my question. My question is: How do I enable this feature in Microsoft Office? When Lync is not installed, Outlook does not ask my application for the interfaces, it does ignore the fact that my applications is the configured default IM application. Only when Lync is installed, Outlook uses this feature.

    Of course I have diffed the two Office installations and I can tell you the dlls that are missing and I could install all that dlls into the Microsoft Office program files folder. But I would avoid this, if possible.

    The question remains:

    - What can I tell the customers to install? The answer "Install Lync" is possible, but this is not my preference. From customers point of view: Why should I install Lync in order to use an other manufacturers SoftPhone / Communication Client?

    - Is there any redist (Lync SDK does not help, it does not install files into the Microsoft Office program files folder)?

    Best regards
    Wolfgang

    Friday, January 29, 2016 6:53 AM
  • Hi Wolfgang,

    Based on my understanding, there is no necessary to install the Lync. To enable the Office application to integrate the a custom IM, the IM need to implement the three interfaces( IUCOfficeIntegration, ILyncClient, IAutomation) mentioned by this article.

    That's means you need to deploy your IM which support integration with Office to the client computer. The IM should contain three main components like below:

    1. Main program of IM

    2. Custom assemblies(contains Microsoft.Office.Uc) implement the three interface above

    3. Setting registry keys and entries

    Here is a figure to demonstrate the relationship between custom IM and Office for your reference:

    More detail about how Office integrates with an IM client application, you can refer to the steps below:

    1. It checks the registry to discover the default IM client application and then connects to it.
    2. It authenticates with the IM client application.
    3. It connects to specific interfaces that are exposed by the IM client application.
    4. It determines the capabilities of the currently signed-in user (local user), including getting the user's contacts, determining the user's presence, and determining the user's IM capabilities (instant messaging, video chat, VOIP, and so on).
    5. It gets presence information for the local user's contacts.
    6. When the IM client application shuts down, the Office 2013 application silently disconnects.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, January 30, 2016 4:34 AM
    Moderator
  • Hello Fei,

    thanks for the explanation. Nevertheless, I have done all this and it works - when Office 2016 Professional or Office 2013 Professional including Lync is installed.

    - Install Office 2016 Professional (contains Skype for Business)
    - Install my application
    -> Integration works (contact cards with avatar, name, IM address, presence, custom status text, start phone call, start chat, everyhting ...)

    or

    - Install Office 2013 Professional (contains Lync)
    - Install my application
    -> Integration works (contact cards with avatar, name, IM address, presence, custom status text, start phone call, start chat, everyhting ...)

    but

    - Intall Office 2013 Standard (no Lync, Skype not installed)
    - Install my application
    -> Integration does not work, office does not call into my application

    My installer sets all required registry keys, the application implements all interfaces, the installer installs the assemblys from the Lync SDK into my own program files directory side-by-side.

    So again the question is: When I have an installed Office 2013 Standard, what I need to install INTO the office directory / or maybe GAC so that Office is accessing my application?

    Best regards
    Wolfgang

    Saturday, January 30, 2016 5:14 PM
  • Hi Wolfgang,

    >>So again the question is: When I have an installed Office 2013 Standard, what I need to install INTO the office directory / or maybe GAC so that Office is accessing my application?

    Installing the assemblies into GAC only make the assemblies shared. The deploy way of assemblies won't affect the function of application. You can refer to more detail about this topic from link below:
    Working with Assemblies and the Global Assembly Cache

    To narrow down this issue whether it is relative to the environment, I suggest that you install the Lync on the computer which installed the Office 2013 Standard whether it works.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, February 1, 2016 2:31 AM
    Moderator
  • Hi Fei,

    I did this test:

    - Installed Office 2013 Professional without Lync
    - My application is running
    - Launch Outlook -> contact card does not show avatar, status, ...

    Then I modified the Office installation by re-starting the Office setup. I just enabled Lync and proceeded and finished the setup.

    - My application is running
    - Launch Outlook -> contact card shows avatar, status etc, -> OK

    Then I modified the Office installation and removed Lync

    - Contact card does not show avatar etc

    Then I modified the Office installation and added Lync

    - Contact card shows avatar, status, .... -> OK

    Some files that are installed along with Lync are OcOffice.dll, UCAddin.dll, lyncDesktopResources.dll, UcAddinRes.dll, .....

    Is there any other way to enable this features without installing Lync?

    Best regards
    Wolfgang

    • Edited by WWall Monday, February 1, 2016 10:00 AM
    Monday, February 1, 2016 10:00 AM
  • Hi Wolfgang,

    Thanks for the detail test.

    How did you deploy your application? Did you deploy all the assemblies that you refer in the project?

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 2, 2016 2:34 AM
    Moderator
  • The msi package contains all referenced assemblies.

    Let me break it down to this question:

    Is Microsoft Office 2013 Standard (without installed Lync 2013 or Skype for Business) expected to support this feature? Is this documented somewhere?


    On the other hand: Referring to your drawing above: I suspected that Office Standard (without Lync) does not even perform step 1 of your drawing (checking the registry). But in fact, the registry keys are evaluated even when Lync is not installed (tested with procmon). This is a hint that it should work without Lync as well.

    These files are added / removed when I add / remove Lync 2013 to / from Office 2013 professional:

    Appshapi.dll
    AppSharingChromeHook.dll
    AppSharingHookController.exe
    appsharingmediaprovider.dll
    appshcom.dll
    appshvw.dll
    AutoHelper.dll
    CommunicatorContentBinApp.xap
    ExtensibleApp.xap
    lync.exe
    lync.ico
    LYNC.EXE.MANIFEST
    lync.VisualElementsManifest.xml
    Lync2013_Third_Party_Notices.txt
    lyncDesktopViewModel.dll
    lynchtmlconv.exe
    lynchtmlconvpxy.dll
    lyncModelProxy.dll
    MeetingJoinAxOC.dll
    Microsoft.Lync.Model.zip
    Microsoft.Lync.Utilities.zip
    Microsoft.Lync.Utilities.Controls.zip
    mmvrairspace.dll
    mmvrcustom.dll
    muauth.cab
    NativeHostAnnotationApp.xap
    NativeHostPollApp.xap
    OCHelper.dll
    ocimport.dll
    OCIntlDate.dll
    ocmsptls.dll
    OcOffice.dll
    ocogl.dll
    Ocomprivate.zip
    ocpptview.dll
    ocppvwintl.dll
    OcPubMgr.exe
    OcPubMgr.VisualElementsManifest.xml
    ocrec.dll
    OCSAEXT.dll
    PropertyModel.dll
    PropertyModelProxy.dll
    Psom.dll
    rdpqoemetrics.dll
    Rtmcodecs.dll
    Rtmmediamanager.dll
    Rtmmvras.dll
    rtmmvrcs.dll
    rtmmvrhw.dll
    Rtmmvrsplitter.dll
    Rtmpal.dll
    RTMPLTFM.dll
    rtmvc1decmft.dll
    scdec.dll
    sqmapi.dll
    System.Windows.Controls.Theming.Toolkit.zip
    tmpod.dll
    Uc.dll
    UCAddin.dll
    UccApi.dll
    UcMapi.exe
    Ucmp.dll
    Win32MsgQueue.dll

    Wolfgang




    • Edited by WWall Tuesday, February 2, 2016 7:31 AM
    Tuesday, February 2, 2016 7:00 AM
  • Ok. Even when Lync is not installed, Outlook reads the IM Providers registry keys.

    But then Outlook retrieves the typelib for interface 6A222195-F65E-467F-8F77-EB180BD85288 (UCOfficeIntegration). The typelib GUID is B9AA1F11-F480-4054-A84E-B5D9277E40A8.

    Friendly name of the typelib is: Unified Collaboration API 1.0 Type Library

    HKEY_CLASSES_ROOT\TypeLib\{B9AA1F11-F480-4054-A84E-B5D9277E40A8}\1.0\0\win32
    links to C:\Program Files (x86)\Microsoft Office\Office15\lync.exe\4

    So the typelib for the required interfaces is contained in lync.exe.

    When I uninstall / or not install lync along with Office, that type library is not registered and Outlook cannot access my UCOfficeIntegration implementation.

    This issue was already handled in https://social.msdn.microsoft.com/Forums/en-US/09627d7d-e736-42c9-8c86-b0a49ff97f29/lync-2013-breaks-unified-collaboration-api-10-type-library?forum=communicatorsdk

    What do you suggest? Should I register my own type library?

    Wolfgang

    Tuesday, February 2, 2016 10:37 AM
  • Hi Wolfgang,

    I am not sure that why the Outlook would try to communicate with the "Unified Collaboration API 1.0 Type Library".

    Based on the "Discovering the IM application" section of "Integrating IM applications with Office" article, the Office application should find the class ID via reading the HKEY_LOCAL_MACHINE\Software\IM Providers\Application nameregistry key and gets the ProcessName and class ID (CLSID) values stored there.

    It should reads the class that you register by your IM application. And what's the bit-ness of OS and your IM application?

    If you were deploying the 32-bit custom IM application on the 64-bit Windows, the correct registry path should be

    HKEY_LOCAL_MACHINE\Wow6432Node\Software\IM Providers\Application name

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 3, 2016 7:55 AM
    Moderator
  • Hi Fei,

    the discovery works well in Outlook. But Outlook cannot use respective COM interfaces because the required type library is not installed - it is contained in the lync.exe.

    Wolfgang

    Wednesday, February 3, 2016 8:14 AM
  • Hi Wolfgang,

    Sorry for the confusion. What's I mean that the Office should discovery the COM component provide your custom IM which implement the IUCOfficeIntegration interface instead of communicating with the component contain in the Lync.exe.

    That's the reason I suggest that checking the registry to see whether the Office application detects the correct component .

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, February 4, 2016 5:27 AM
    Moderator
  • When Lync is not installed, the interface UCOfficeIntegration 6A222195-F65E-467F-8F77-EB180BD85288  is not registered. So Office will receive an error like "Class not registered". The interfaces need to registered, or not?

    Wolfgang

    Thursday, February 4, 2016 6:11 AM
  • Hi Wolfgang,

    >>So Office will receive an error like "Class not registered". The interfaces need to registered, or not?<<

    No, it shouldn't need to registered. As I described above, the Office application shouldn't try to communicate with UCOfficeIntegration 6A222195-F65E-467F-8F77-EB180BD85288. The correct comment should be implement the IUCOfficeIntegration interface by yourself.

    Please check the registry listed below to narrow down the reason that why Office try to find the incorrect compent:

    Table 1. Registry keys for setting the default IM client application

    Key

    Entry

    Type

    Value

    Example

    HKEY_LOCAL_MACHINE\Software\IM Providers\<Application name>

    FriendlyName

    REG_SZ

    The name of the third-party IM client application.

    Litware IM 2012

    ProcessName

    REG_SZ

    The process name of the third-party IM client application.

    litware.exe

    GUID

    REG_SZ

    A class ID (CLSID) for the root, cocreatable class in the IM application (the class that implements the IUCOfficeIntegration interface).

    (A GUID)

    HKEY_CURRENT_USER\Software\IM Providers

    DefaultIMApp

    REG_SZ

    The name of the IM client application. This must be the same as the name at the top-level registry key (hive) in the HKEY_LOCAL_MACHINE.

    Litware

    HKEY_CURRENT_USER\Software\IM Providers\<Application name>

    UpAndRunning

    REG_DWORD

    An integer value between 0 and 2:

    • 0—Not running

    • 1—Starting

    • 2—Running

    Note                             Note                          

    The application name registry key must be the same as the value of the DefaultIMApp entry.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, February 5, 2016 8:05 AM
    Moderator
  • I guess, we can stop this discussion at this point. As I have multiple times explained, the discovery works - I can proof this when monitoring the startup of Outlook using procmon. It is just about registered / not registered COM interfaces. I give up this discussion.

    Wolfgang


    • Edited by WWall Tuesday, March 15, 2016 8:40 AM
    Friday, February 5, 2016 8:09 AM
  • hi Wolfgang,

    I'm trying to integrate my IM client with Outlook 2013/16, I have implemented the interfaces as described in https://msdn.microsoft.com/en-us/library/office/jj900715.aspx. 

    I have registered my COM server and IUCOfficeIntegration is invoked by Outlook and appropriate methods are called no issues.

    The issue I'm facing now

     MyContactManager.lookup is called by outlook, how to inform presence availability back to Outlook :), I called ..CallbackClass.OnLookup(m_ctMgr, searchedContactObject, asynObj) but no response from outlook after that :(

    I don't see enough documentation  in the msdn, if some one have implemented, please share the knowledge.

    can you please let me let me know, is there any documentation, which describes all about.


    Balamurali C


    • Edited by techpach Wednesday, February 17, 2016 10:21 AM
    Wednesday, February 17, 2016 9:41 AM
  • Hi Wolfgang,

    Could you please guide me what is the solution of above issue if you have resolved it.

    Thanks in Advance.

    Regards,

    Krish

    Monday, March 14, 2016 9:49 AM
  • Hi Krish,

    the technical solution / workaround is (though it may have a legal issue regarding reverse-engineering):

    - Open Lync.exe in Visual Studio

    - In the resources, you will find the embedded type library (there are four type libraries, I think it was the first one)

    - Export that type library into a tlb file

    - Intall and register that tlb in your setup

    Using WiX:

        <Component Id="ComponentUnifiedCollaborationAPI" Guid="<... your guid>" Directory="INSTALLDIR_UC"  Location="local">
          <File Id="lync2013.tlb" Name="UnifiedCollaborationAPI.tlb" KeyPath="yes" DiskId="1" Source="$(var.SolutionDir)lib\LyncSDK\lync2013.tlb">
            <TypeLib Id="{B9AA1F11-F480-4054-A84E-B5D9277E40A8}" Advertise="yes" Description="Unified Collaboration API 1.0 Type Library" Language="0" MajorVersion="1" MinorVersion="0" ></TypeLib>
          </File>
        </Component>

    - The class declaration should look like this:

       [ComSourceInterfaces(typeof(_IUCOfficeIntegrationEvents))]
       [Guid("your GUID"), ComVisible(true)]
       public class YourUCOfficeIntegration :  UCOfficeIntegration
       {........}

    - When writing the registry keys in key HKEY_LOCAL_MACHINE\SOFTWARE\IM Providers, write as well the GUID of your COM object as value GUID (like Skype does)

    - Write the registry keys into HKCR for your class, ensure that the type library references refer to the registered {B9AA1F11-F480-4054-A84E-B5D9277E40A8}

    - Install the tlb only, when it is not yet registered. Otherwise you will break that other software when your app is de-installed.

    This should do the job.

    As I pointed out here (http://stackoverflow.com/questions/33830124/icontactsandgroupscallback-onlookup): When integrating your IM applications with Office, you should implement a simple Office mock and call your own IM application interface. This will help in finding any issues with event handling etc. Then you can change the default IM application by modifying the value in HKEY_CURRENT_USER\Software\IM Providers and compare the responses from your application with the responses you get from other applications where you know that they are integrating correctly. Imagine that you are writing a CRM application where you would like show presence information from Skype. By doing so you will as well get helpful errors, when i.e. your COM object implementation is not correct. In my case the most issues were regarding the correct event callback interfaces.

    Wolfgang



    • Edited by WWall Tuesday, March 15, 2016 8:17 AM
    Tuesday, March 15, 2016 8:14 AM
  • Hi Wolfgang,

    Thank you so much for this help.. I didnt try it yet. 

    I am getting another issue.

    User's presence (contact card presence) is not getting updating/enable. I tried many ways but could not get achieve the presence in outlook.

    Please help if possible.

    Thanks in Advance.

    Regards,

    Krishna

    Monday, March 21, 2016 10:49 AM

  • Hi Wolfgang,

    I am using the same mock that you have given here "http://stackoverflow.com/questions/33830124/icontactsandgroupscallback-onlookup". All events of IM client to Mock App is working fine. But these are not working with Outlook 2013.

    Could you please help to resolve this issue? 

    Events: OnStateChanged, OnContactInformationChanged etc.

    regards,

    Krish


    • Edited by KrishPS Tuesday, June 7, 2016 6:48 AM
    Tuesday, June 7, 2016 6:48 AM
  • Hi Wolfgang,

    I am trying to achieve the same stuff but not able to do it. As per your suggestion: 

    - Open Lync.exe in Visual Studio

    - In the resources, you will find the embedded type library (there are four type libraries, I think it was the first one)

    I tried above option but, it is not showing any resources. When you say lync.exe, I am getting it from the Outlook installation location. I am using visual studio.net 2013.

    Please help.

    Thanks,

    Dileep


    • Edited by VermaDK Tuesday, June 7, 2016 7:30 AM
    Tuesday, June 7, 2016 7:29 AM
  • Hello Wolfgang,

    Thanks for the reply.

    We meed another problem during implementing the IM provider:
    Currently, it works well, but when I turn the PC to sleep, then assume back, the Outlook will crash, we located the reason, it is caused by the IM provider, but we don't know the root cause for a long time...

    We want to know if you have any tips for this maybe you have met it before. 

    Thank you very much!


    to be next!

    Thursday, January 24, 2019 6:35 AM
  • Hi Rukai, I recommend you create a dump file with procdump.exe. 

    By the way, can Outlook handle your events successfully?It just do not try to get my contact presence notification.


    • Edited by Alisa Yang Thursday, January 24, 2019 7:14 AM
    Thursday, January 24, 2019 7:13 AM
  • Hello Alisa,

    Thanks for the reply.

    I've created a dump file, but it doesn't show any valuable information where the Outlook crashed... :(


    to be next!

    Tuesday, January 29, 2019 9:19 AM