473,405 Members | 2,310 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,405 software developers and data experts.

HELP: Automating Word

Rob
Here is my issue: I am trying to load word through vb.net
code behind an ASP.NET webform.
I know it is possible to use the Automation and COM
classes because a co-worker has it working on his machine
with an identical setup.
I am referencing the Interop.Word references. I have read
the Considerations Article Microsoft has written about
using Word at the Server level, I am aware of the security
risks involved as well. However, that all aside, a client
needs to have this work in Word, and, even worse, Word
97. Here is my code:

Dim WordTest47 As Word.ApplicationClass
Dim WordDoc47 As Word.Document

WordTest47 = New Word.ApplicationClass
WordTest47 = CType(WordTest47, Word.ApplicationClass)
WordDoc47 = New Word.Document
WordDoc47 = WordTest47.Documents.Open(strUserPath
& "\Basis.doc")

It crashes on the Open line with an error of:
WordTest47.Documents.Open(strUserPath
& "\BasisTemplate.doc") Run-time exception thrown :
System.Runtime.InteropServices.COMException - Could not
open macro storage.

I have tried everythng: setting up security permissions
in dcomcnfg, user permissions, accounts, etc. I have been
look for over a week straight working on the same
problem. I can not accomplish the same functionality
using any scripting such as VBScript. I simply can not
understand how it will work on two machines in our office,
and yet not on others.

We have checked every setting we can think of. If anyone
knows of anything to check we would greatly greatly
appreciate it. We have wasted a lot of effort and energy
in solving this issue to no avail.

Our current setup is Visual Studio .NET 2003, IIS 5 (both
with latest updates and patches), and Office 97 Pro sr2.

If this is the wrong group I apologize for the post.

thanks in advance,
Rob

Nov 21 '05 #1
4 3303
Rob
I realize the Error says TemplateBasis.doc, i just typed
the wrong thing in the post and copied the error. I am
using the same document and it exists.
-----Original Message-----
Here is my issue: I am trying to load word through vb.netcode behind an ASP.NET webform.
I know it is possible to use the Automation and COM
classes because a co-worker has it working on his machine
with an identical setup.
I am referencing the Interop.Word references. I have readthe Considerations Article Microsoft has written about
using Word at the Server level, I am aware of the securityrisks involved as well. However, that all aside, a clientneeds to have this work in Word, and, even worse, Word
97. Here is my code:

Dim WordTest47 As Word.ApplicationClass
Dim WordDoc47 As Word.Document

WordTest47 = New Word.ApplicationClass
WordTest47 = CType(WordTest47, Word.ApplicationClass)
WordDoc47 = New Word.Document
WordDoc47 = WordTest47.Documents.Open(strUserPath
& "\Basis.doc")

It crashes on the Open line with an error of:
WordTest47.Documents.Open(strUserPath
& "\BasisTemplate.doc") Run-time exception thrown :System.Runtime.InteropServices.COMException - Could not
open macro storage.

I have tried everythng: setting up security permissions
in dcomcnfg, user permissions, accounts, etc. I have beenlook for over a week straight working on the same
problem. I can not accomplish the same functionality
using any scripting such as VBScript. I simply can not
understand how it will work on two machines in our office,and yet not on others.

We have checked every setting we can think of. If anyone
knows of anything to check we would greatly greatly
appreciate it. We have wasted a lot of effort and energy
in solving this issue to no avail.

Our current setup is Visual Studio .NET 2003, IIS 5 (both
with latest updates and patches), and Office 97 Pro sr2.

If this is the wrong group I apologize for the post.

thanks in advance,
Rob

.

Nov 21 '05 #2
http://support.microsoft.com/kb/q224338/

http://www.kbalertz.com/kb_220681.aspx

Find out what account coworker is running under.

"Rob" <sa******@pkmj.com> wrote in message
news:19****************************@phx.gbl:
Here is my issue: I am trying to load word through vb.net
code behind an ASP.NET webform.
I know it is possible to use the Automation and COM
classes because a co-worker has it working on his machine
with an identical setup.
I am referencing the Interop.Word references. I have read
the Considerations Article Microsoft has written about
using Word at the Server level, I am aware of the security
risks involved as well. However, that all aside, a client
needs to have this work in Word, and, even worse, Word
97. Here is my code:

Dim WordTest47 As Word.ApplicationClass
Dim WordDoc47 As Word.Document

WordTest47 = New Word.ApplicationClass
WordTest47 = CType(WordTest47, Word.ApplicationClass)
WordDoc47 = New Word.Document
WordDoc47 = WordTest47.Documents.Open(strUserPath
& "\Basis.doc")

It crashes on the Open line with an error of:
WordTest47.Documents.Open(strUserPath
& "\BasisTemplate.doc") Run-time exception thrown :
System.Runtime.InteropServices.COMException - Could not
open macro storage.

I have tried everythng: setting up security permissions
in dcomcnfg, user permissions, accounts, etc. I have been
look for over a week straight working on the same
problem. I can not accomplish the same functionality
using any scripting such as VBScript. I simply can not
understand how it will work on two machines in our office,
and yet not on others.

We have checked every setting we can think of. If anyone
knows of anything to check we would greatly greatly
appreciate it. We have wasted a lot of effort and energy
in solving this issue to no avail.

Our current setup is Visual Studio .NET 2003, IIS 5 (both
with latest updates and patches), and Office 97 Pro sr2.

If this is the wrong group I apologize for the post.

thanks in advance,
Rob


Nov 21 '05 #3
Rob
Thanks...seen both of those articles already. Nothing
seems to work on my machine. It has to be some obscure
registry or COM or permissions setting somewhere we are
missing. To have it work on two machines, and not on two
others that seem to have the exact same setup, settings,
permissions etc. This has been a frustrating process.

-----Original Message-----
http://support.microsoft.com/kb/q224338/

http://www.kbalertz.com/kb_220681.aspx

Find out what account coworker is running under.

"Rob" <sa******@pkmj.com> wrote in message
news:19****************************@phx.gbl:
Here is my issue: I am trying to load word through vb.net code behind an ASP.NET webform.
I know it is possible to use the Automation and COM
classes because a co-worker has it working on his machine with an identical setup.
I am referencing the Interop.Word references. I have read the Considerations Article Microsoft has written about
using Word at the Server level, I am aware of the security risks involved as well. However, that all aside, a client needs to have this work in Word, and, even worse, Word
97. Here is my code:

Dim WordTest47 As Word.ApplicationClass
Dim WordDoc47 As Word.Document

WordTest47 = New Word.ApplicationClass
WordTest47 = CType(WordTest47, Word.ApplicationClass)
WordDoc47 = New Word.Document
WordDoc47 = WordTest47.Documents.Open(strUserPath
& "\Basis.doc")

It crashes on the Open line with an error of:
WordTest47.Documents.Open(strUserPath
& "\BasisTemplate.doc") Run-time exception thrown :
System.Runtime.InteropServices.COMException - Could not
open macro storage.

I have tried everythng: setting up security permissions
in dcomcnfg, user permissions, accounts, etc. I have been look for over a week straight working on the same
problem. I can not accomplish the same functionality
using any scripting such as VBScript. I simply can not
understand how it will work on two machines in our office, and yet not on others.

We have checked every setting we can think of. If anyone knows of anything to check we would greatly greatly
appreciate it. We have wasted a lot of effort and energy in solving this issue to no avail.

Our current setup is Visual Studio .NET 2003, IIS 5 (both with latest updates and patches), and Office 97 Pro sr2.

If this is the wrong group I apologize for the post.

thanks in advance,
Rob


.

Nov 21 '05 #4
Shut down the windows firewall, any other security apparatus running
(zone alarm, spy bot etc) and antivirus software temporarily. Norton
products are notorious for screwing up automation.
"Rob" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl:
Thanks...seen both of those articles already. Nothing
seems to work on my machine. It has to be some obscure
registry or COM or permissions setting somewhere we are
missing. To have it work on two machines, and not on two
others that seem to have the exact same setup, settings,
permissions etc. This has been a frustrating process.

-----Original Message-----
http://support.microsoft.com/kb/q224338/

http://www.kbalertz.com/kb_220681.aspx

Find out what account coworker is running under.

"Rob" <sa******@pkmj.com> wrote in message
news:19****************************@phx.gbl:
Here is my issue: I am trying to load word through vb.net code behind an ASP.NET webform.
I know it is possible to use the Automation and COM
classes because a co-worker has it working on his machine with an identical setup.
I am referencing the Interop.Word references. I have read the Considerations Article Microsoft has written about
using Word at the Server level, I am aware of the security risks involved as well. However, that all aside, a client needs to have this work in Word, and, even worse, Word
97. Here is my code:

Dim WordTest47 As Word.ApplicationClass
Dim WordDoc47 As Word.Document

WordTest47 = New Word.ApplicationClass
WordTest47 = CType(WordTest47, Word.ApplicationClass)
WordDoc47 = New Word.Document
WordDoc47 = WordTest47.Documents.Open(strUserPath
& "\Basis.doc")

It crashes on the Open line with an error of:
WordTest47.Documents.Open(strUserPath
& "\BasisTemplate.doc") Run-time exception thrown :
System.Runtime.InteropServices.COMException - Could not
open macro storage.

I have tried everythng: setting up security permissions
in dcomcnfg, user permissions, accounts, etc. I have been look for over a week straight working on the same
problem. I can not accomplish the same functionality
using any scripting such as VBScript. I simply can not
understand how it will work on two machines in our office, and yet not on others.

We have checked every setting we can think of. If anyone knows of anything to check we would greatly greatly
appreciate it. We have wasted a lot of effort and energy in solving this issue to no avail.

Our current setup is Visual Studio .NET 2003, IIS 5 (both with latest updates and patches), and Office 97 Pro sr2.

If this is the wrong group I apologize for the post.

thanks in advance,
Rob


.


Nov 21 '05 #5

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

Similar topics

0
by: gizmo | last post by:
We have a requirement to initiate more than one instance of an application using the filenames. (the example below will start two instances of MS Word). The problem is that we need to close each...
10
by: Elizabeth Harmon | last post by:
Hi All I am attempting to open a Word App from a web page on the client and so far everything works (After reconfig of dcomcnfg for Microsoft Word Document). I have one minor problem, i cannot...
2
by: Al_P via DotNetMonster.com | last post by:
I have: Win2K Office2000 Working in VB.Net (2003) My .Net project has a reference to Word 9.0 Instantiating things in a simple and straightforward manner: Dim word as Word.Application Dim...
1
by: John Welch | last post by:
I'm trying to use the Mergit() function from the MS Knowledge base article to merge data from a query or table in my Access 2000 mdb into an existing word merge document. Every time it runs it...
10
by: mc | last post by:
I've know that Microsoft don't currently recommend this process, what I'm trying to find out is why? This is a feature that I've used (with Classic ASP) in the past with a great deal of success....
0
by: pbrady1970 | last post by:
I would like to know if it is possible to create an instance of Word and pass the "-a" parameter/switch (Start Word and prevent add-ins ) CDispatch oWord; try { CP(_T("GenerateWithWord...
2
by: chutney | last post by:
Dear all, please excuse the fact that this is not an explicit problem I have, but more of a general query. I have an Access database (2003) with a load of contact details in it. Including various...
6
by: cj2 | last post by:
I need to create a cover letter in VB. It will have a customers account number at the top and be addressed to them by name for example (Dear Mr. Smith). After this it will be the same text for...
3
by: MickT | last post by:
Hello, I am coding in VB.NET with Option Strict ON in Visual Basic 2008 Express My code is to automate WORD from a VB.NET windows application, as I used to in VB6. Part of my code is ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...

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.