Word add in does not load

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

Word add in does not load
 
zipi sompo




Posts: 125
Joined: 2013-09-03
Hi,
I have a problem in some end user hosts (mainly Office 2016).
When I open the word programmatically from another application like this:


Microsoft.Office.Interop.Word.Application ap = new Microsoft.Office.Interop.Word.Application();
ap.Visible = true;	
Document doc = ap.Documents.Open(pathToOpen);



The word add-in does not load.
If I go to Word File ->options - > managed add ons -> com add ins
I mark the checkbox of my word add-in but still it does not appear in tool bar.
The loadBehavior=3 in registry.
I sent you the adxregistrator.log via the mail.
Thanks!
Posted 04 Sep, 2017 07:23:23 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello Zipi,

zipi sompo writes:
I open the word programmatically from another application


If the Word add-in is per user, make sure you start that application non-elevated.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Sep, 2017 09:06:28 Top
zipi sompo




Posts: 125
Joined: 2013-09-03
Hi,
what do you mean 'make sure you start that application non-elevated'. ?
I open the word in my broker project.

if I choose registerForAllUsers = true (in word add in project) the problem resolved.
Posted 05 Sep, 2017 02:41:29 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello,

If Word (or any Office application) is started elevated, it doesn't load per-user COM add-ins.

A program is elevated if you start it using the "Start as administrator" command. Starting Word from an elevated program makes it elevated as well. An elevated program doesn't see per-user COM registrations; this is true starting from Vista SP1 - see https://blogs.msdn.microsoft.com/cjacks/2008/06/06/per-user-com-registrations-and-elevated-processes-with-uac-on-windows-vista-sp1/.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Sep, 2017 05:41:49 Top
zipi sompo




Posts: 125
Joined: 2013-09-03
Thanks a lot!
Posted 05 Sep, 2017 07:20:32 Top