c# word automation need code to delete all macros in a word document

R

RobertK

I need to write a c# code that will open up word documents and delete
all the macros in it. Can some one please give me a code example or
any ideas on how to do this.

I already know how to open word docs from c# but I need the code to
find all macros and remove them.
 
A

Andrey Dzizenko

There's Document.VBProject.VBComponentsm which includes document's
projects.
You can access it. This collection has a method called Remove, but try to
use it - i don't sure if it helps.
 

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