By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,402 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

HELP: Automating Word

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.