Shared Instance for multiple applications

Add-in Express™ Support Service
That's what is more important than anything else

Shared Instance for multiple applications
 
Balaji




Posts: 20
Joined: 2017-04-19
Hi Team,

We are using Add-in Module container for multiple applications (Outlook,Word,Excel) to load web application. While opening the applications for the first time , our web application makes few API calls to get the relevant data.

For instance , if we open Outlook for the first time , the web application makes all necessary API calls to the server. And If we open Excel , same set of calls has been made again to the server.

Using Add-In Module , is that possible to have shared instances for all the API calls across the applications rather than sending request again for each application.
Posted 09 Jan, 2018 07:01:48 Top
Andrei Smolin


Add-in Express team


Posts: 14713
Joined: 2006-05-11
Hello Balaji,

If your add-in is loaded by any other Office applications, you can call a public method/property defined on the add-in module to find that information:

{an Application object}.COMAddins.Item(strMyComAddinProgId).Object.MyPublicPropertyOrMethod

1. an Application object can be Outlook.Application, Word.Application, etc.
2. strMyComAddinProgId - see the ProgId attribute of your add-in module.
3. MyPublicPropertyOrMethod is called via late binding (see System.Type.InvokeMember in MSDN or search through our forums)

See also http://www.add-in-express.com/creating-addins-blog/2010/07/02/standalone-application-addin-communicate/.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 09 Jan, 2018 08:12:51 Top