Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Web Authoring / July 2005

Tip: Looking for answers? Try searching our database.

Automating Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 20 Oct 2004 19:51 GMT
I know this is possible because I co-worker has it working
on his machine with an identical setup...so, I am trying
to load word through vb.net code behind an ASP.NET webform.
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
Rob - 20 Oct 2004 20:11 GMT
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-----
>I know this is possible because I co-worker has it working
[quoted text clipped - 44 lines]
>
>.
tyygtg - 03 Jul 2005 05:11 GMT
Hi, did u find any solution? i'm in the same situation.

--
tyygtg


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.