Calling VBA functions from C# Addin

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

Calling VBA functions from C# Addin
 
Felix Pause


Guest


Hello,

we are pretty happy with all the features and stability wich addin-express offers.
But sadly I didn't found a documentation for our Problem.

Our Problem is that we want to Call VBA function of an already existing VBA-Word 2003 addin.
So is it possible to call these function (the functions I want to call are all "void"-like and don't give back a value that I would have to handle).

We have currently quite a big word addin - and now we want to create all the GUI-part witch addin express and C# and slowly convert everything till there is no more VBA Code - therefore it would be great if we could call our functions from C# code and then migrate the addin step by step.

I hope you understand what I mean and I hope you can help me out.

Best Regards
Felix
Posted 12 Sep, 2014 05:30:50 Top
Andrei Smolin


Add-in Express team


Posts: 19100
Joined: 2006-05-11
Hello Felix,

All object models in Office are vast. We cannot even mention all of the features of selected Office applications. That would require creating a separate book for every such application.

You need to use the Run method of the Word.Application object (you access the ibject via the WordApp property of the add-in module), see http://msdn.microsoft.com/en-us/library/office/ff838935%28v=office.15%29.aspx.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Sep, 2014 05:52:10 Top
Felix Pause


Guest


Ok- got it.
You pushed me in the right direction - thanks for that.
Posted 12 Sep, 2014 06:35:42 Top
Andrei Smolin


Add-in Express team


Posts: 19100
Joined: 2006-05-11
You are welcome. Glad to be of help.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Sep, 2014 06:48:14 Top