473,804 Members | 3,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Word.Applicatio nClass disabling macros

Hi

I'm using the word.applicatio nclass 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.applicatio nclass object.

Thanks
Paul

Example code

Dim WordApp As New Word.Applicatio nClass

WordApp.Documen ts.Open(filenam e, 0, 1)


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

¤ Hi
¤
¤ I'm using the word.applicatio nclass 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.applicatio nclass object.
¤
¤ Thanks
¤ Paul
¤
¤ Example code
¤
¤ Dim WordApp As New Word.Applicatio nClass
¤
¤ WordApp.Documen ts.Open(filenam e, 0, 1)

You may want to try WordBasic.Disab leAutoMacros.
Paul ~~~ pc******@amerit ech.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
509
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 can do that by running winword /a, but not sure how to add the switch using the word.applicationclass object. Thanks
0
2898
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: Sub replaceall() '
3
7351
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 Word.ApplicationClass(); But my application give me error : The type or namespace name 'ApplicationClass' does not exist in the class or namespace 'kalite.Word' (are you missing an assembly reference?) Where I am wrong.
4
11135
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 done this? Does it seem possible? I followed the instructions from a sample on the Microsoft knowledge base but it only seems to work when creating a VB.NET Windows .EXE, not an VB.NET ASP app.
3
6133
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 done this? Does it seem possible? I followed the instructions from a sample on the Microsoft knowledge base but it only seems to work when creating a VB.NET Windows .EXE, not an VB.NET ASP app.
0
1125
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. I am using authentication "no anonymous", so it should be able to get the right Normal.dot from my profile (correct assumption?). I am aware of article http://support.microsoft.com/default.aspx?scid=kb;EN-US;288366 but that does not really...
0
1173
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 done this? Does it seem possible? I followed the instructions from a sample on the Microsoft knowledge base but it only seems to work when creating a VB.NET Windows .EXE, not an VB.NET ASP app.
14
5301
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
11455
by: Alan T | last post by:
private Interop.Word.Application _wordApp; What is the differences betwenn _wordApp.Quit(...) and _wordApp.Application.Quit(...) ?
1
7304
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 Word.ApplicationClass(); wd.Caption = "My Word"; int wordHandle = FindWindow("Opusapp", wd.Caption); Questions:
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.