Word.ApplicationClass disabling macros

M

MSNEWS

Hi

I'm using the word.applicationclass within my vb.net application to convert
some word documents to text files.

Is there anyway I can disable macros whilst loading the document, in Word I
can do that by running winword /a, but not sure how to add the switch using
the word.applicationclass object.

Thanks
Paul

Example code

Dim WordApp As New Word.ApplicationClass

WordApp.Documents.Open(filename, 0, 1)
 
P

Paul Clement

¤ Hi
¤
¤ I'm using the word.applicationclass within my vb.net application to convert
¤ some word documents to text files.
¤
¤ Is there anyway I can disable macros whilst loading the document, in Word I
¤ can do that by running winword /a, but not sure how to add the switch using
¤ the word.applicationclass object.
¤
¤ Thanks
¤ Paul
¤
¤ Example code
¤
¤ Dim WordApp As New Word.ApplicationClass
¤
¤ WordApp.Documents.Open(filename, 0, 1)

You may want to try WordBasic.DisableAutoMacros.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

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

Similar Threads


Top