Execute a COM Add-in from within a COM Add-in

H

Hans-Otto

Hi,
in VB.net I wrote a VSTO COM Add-in for Word which should call a different
COM Add-in before closing.
For this second COM Add-in I have no access to the sources. Both COM Add-ins
are using Windows forms to interact with the user.
To call the second COM Add-in I use
commandBars("XY").Controls("button").Execute()
to simulate the click of a user.

Doing this I don't get any error but on the other hand it does'nt execute!

The reason might be that two COM Add-ins can not run in parallel.
Has somebody an idea how to realize this?
 
C

Cindy M.

Hi Hans,
in VB.net I wrote a VSTO COM Add-in for Word which should call a different
COM Add-in before closing.
For this second COM Add-in I have no access to the sources. Both COM Add-ins
are using Windows forms to interact with the user.
To call the second COM Add-in I use
commandBars("XY").Controls("button").Execute()
to simulate the click of a user.

Doing this I don't get any error but on the other hand it does'nt execute!

The reason might be that two COM Add-ins can not run in parallel.
Has somebody an idea how to realize this?
Each Add-in will be running in its own AppDomain, which is why they aren't
visible to each other. You need to use Remoting to access a separate AppDomain

A VBA forum isn't the optimal place to get help with VSTO questions :) Try the
VSTO forum, instead
http://social.msdn.microsoft.com/Forums/en-US/vsto/threads/

If you search Remoting in that forum you should turn up discussions that
illustrate the basic principles.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top