using VSTO (.Net) code from inside vba?

H

HockeyFan

Can this be done? I've got a co-worker that is wanting to do this,
and I'm trying to help out but haven't tried to do this before. I
have ran vba from the VSTO code, but not the other way.
 
C

Cindy M.

Hi HockeyFan,
Can this be done? I've got a co-worker that is wanting to do this,
and I'm trying to help out but haven't tried to do this before. I
have ran vba from the VSTO code, but not the other way.
You may want to go to the VSTO forum with this

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=16&SiteID=1&P
ageID=0

I don't think it's directly possible (not before Orcas is released,
anyway). In order for VBA to be able to call functionality in .NET,
that code has to be made COM-visible. And that's not something you
can do in a VSTO solution. However, you could put this functionality
in a separate DLL that is made COM-visible and call into it from both
the VSTO and the VBA sides. Keep in mind that the COM-visible DLL
would have to have Full Trust, same as the VSTO solution.

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 :)
 
Top