Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open Word document using VB.NET
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
00990971
Message ID:
00990979
Views:
27
Hi Eric,

Office interops are installed. I have OfficeXP on my dev box, client uses Office 2000.

Al

>Are you using same Office versions? Have you installed Office Interops?
>
>
>>Hi,
>>
>>Just trying to open a Word Document using VB.NET.
>>
>>This code works on my dev box.
>>
>>
>>
>>Dim wrdDoc As Word.Document
>>Dim wrdApp As Word.Application
>>Dim strLargEnvTemplate as String = "C:\EnvTemplate.doc"
>>
>>wrdApp = CType(CreateObject("Word.Application"), Word.Application)
>>wrdApp.Visible = True
>>
>>wrdDoc = wrdApp.Documents.Open(strLargEnvTemplate)
>>
>>
>>
>>However, at the client site, an exception is created on
>>
>>
>>
>>wrdDoc = wrdApp.Documents.Open(strLargEnvTemplate)
>>
>>'The error message is "Object Reference not set to instance of an object"
>>
>>'Word is instantiated OK - but the document will not load...
>>
>>
>>Any idea why the code works on my dev box but generates an exception on the production PC's?
>>
>>Is there a better way to open a Word Document from VB.NET?
Al Williams

Anola MB, CANADA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform