You can use .NET Interop. It's an optional component of the Microsoft Office install.
Running VBA code on Word documents that do not have Macros
题
I have looked all over to try and find an example of C# code that calls VBA code to run on a word document.
I am looking for a way to take dynamically generated VBA code and using it on a template copy.
没有正确的解决方案
其他提示
不隶属于 StackOverflow