C# – Is it possible to call C# dlls from Visual Basic code contained in a Word 2007 file

cms-wordvb.net

I have some Visual Basic methods that are acting as the click handlers for a custom Word Ribbon. Unfortunately, I already have the implementation of what the handlers have to do written in C# which is loaded into the Word document as an XML Expansion Pack.

I don't see any way to add a reference to the C# .dlls to Word's Visual Basic Editor. Is this possible?

Best Answer

The C# component would have to expose a COM interface. http://msdn.microsoft.com/en-us/library/c3fd4a20.aspx.

Related Topic