473,320 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Word.ApplicationClass disabling macros

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)


Nov 22 '05 #1
1 2770
On Tue, 29 Jun 2004 10:46:55 -0400, "MSNEWS" <xx@nospam.com> wrote:

¤ 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 ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: MSNEWS | last post by:
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...
0
by: David Krmpotic | last post by:
Regards, I need a little explanation in converting word VB macros to charp code! first, I recorded simple macro which replaces every occurence of one word in whole document (is it?) , here:...
3
by: selen | last post by:
Hello I add Microsoft Word 10.0 Object Library from reference com. and I am writing my code to create an instance of a Word application.My code is Word.ApplicationClass oWordApp = new...
4
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone...
3
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone...
0
by: John Dolinka | last post by:
I am trying to run a word macro via automation from an asp.net application. The document loads well enough, but I get an "Unable to run the specified macro" error when attempting to run the macro. ...
0
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone...
14
by: Alan T | last post by:
These are the codes I created a document: _WordApp = new Interop.Word.Application(); _WordApp.Visible = false; _WordDoc = new Document(); _Missing = System.Reflection.Missing.Value;
2
by: Alan T | last post by:
private Interop.Word.Application _wordApp; What is the differences betwenn _wordApp.Quit(...) and _wordApp.Application.Quit(...) ?
1
by: inxanu | last post by:
First of all, I am unsure as to where to post it, so please let me know (or move it) to where it should be. I create an instance of word as follows Word.ApplicationClass wd = new...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.