activate with command line switch

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

activate with command line switch
activate with command line switch  
Don McDonald


Guest


Hi
I have written a school testing program that locks the user. If I deploy the addin it immediately locks up word as if a user was writing a test. Is there a way I can activate the program with a command line switch?
ie. windword.exe /myaddin
I need it to deactivate when the user quits the test.

Thanks
Don McDonald
Posted 30 Sep, 2011 16:38:43 Top
Eugene Astafiev


Guest


Hi Don,

Please take a look at the http://office.microsoft.com/en-us/word-help/command-line-switches-for-microsoft-office-word-2007-HP010164010.aspx article. Pay special attention to the /ladd-in command line switch. Is it what you are looking for?
Posted 03 Oct, 2011 04:36:50 Top
Don McDonald


Guest


Hi Eugene
No this is not what I need. I need a command line to register my addin and a command line to unregister my addin after I am done.

Don
Posted 03 Oct, 2011 09:21:13 Top
Eugene Astafiev


Guest


Hi Don,

Unfortunately Word doesn't provide such command line parameter. Instead, please use the adxregistrator.exe utility for registering and unregistering add-ins. You can read more about the command line format in the http://www.add-in-express.com/creating-addins-blog/2011/02/22/deploying-peruser-office-extension-msi-installer/ or http://www.add-in-express.com/creating-addins-blog/2011/02/22/deploying-permachine-office-extensions-msi-installer/ articles on our technical blog.
Posted 03 Oct, 2011 09:29:51 Top
Don McDonald


Guest


Hi Eugene

I do not have a problem installing this to a computer.

The problem that I have is that I do not want it to be active all the time. I would like to activate it( register ?) from another program by command line and deactivate it( unregister ? ) after word exits. Your articles do not explain how to do this.

Do I need to reinstall and uninstall every time I want to run it?

Don
Posted 03 Oct, 2011 13:20:13 Top
Eugene Astafiev


Guest


Hi Don,

It looks like you are interested in the Connect property of the COMAddin class in Office. Using the Connect property you can load/unload a per-user add-in dynamically. Please read more about this way in the http://www.add-in-express.com/creating-addins-blog/2010/07/02/standalone-application-addin-communicate/ article on our technical blog. Is it what you are looking for?
Posted 03 Oct, 2011 14:37:41 Top
Don McDonald


Guest


Thanks for the update. I believe this would answer my question. I have switched to leaving the addin run all the time and only have it activate on certain conditions which I believe will work better. I have one simple request. I have tried your control scanner but I can't seem to locate the button to view and manage add-ins. I wish to disable this.
I have tried disabling ComAddinsDialog and DocumentTemplate but neither seemed to work.

Don McDonald
Posted 06 Oct, 2011 22:08:10 Top
Eugene Astafiev


Guest


Hi Don,

What Office version do you use? Anyway, if you want to prevent users from disabling your add-in you need to disable the Tools | Options (Outlook 2000-2007) and File | Options (Outlook 2010) main menu. But this is not the right strategy because users will not be able to chage their settings in Outlook at all.
Posted 07 Oct, 2011 00:13:39 Top
Don McDonald


Guest


Hi Eugene

For this program I just want to prevent the users from disabling my addin. The software is a testing program and I need to keep the security high. If possible I would like to just disable the addin not the other options. I am using word 2007 and will migrate to 2010.

Don
Posted 07 Oct, 2011 09:09:57 Top
Eugene Astafiev


Guest


Hi Don,

There is no any trivial way for preventing users from disabling your add-in (except disabling/hiding the Options button in Outlook, of course).
Posted 07 Oct, 2011 09:20:30 Top