R
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
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