Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open Word document using VB.NET
Message
 
À
27/02/2005 10:48:12
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
00990971
Message ID:
00990986
Vues:
38
Thanks Bonnie. I appreciate your assistance.

If you do come across anything that may be of assistance in the next few days - please let me know.

Al



>Unfortunately, off the top of my head, I don't know what the differences are and I don't have the code on this computer, so I can't be of much direct help today.
>
>~~Bonnie
>
>
>>Hi Bonnie,
>>
>>You're right. I have OfficeXP, the client has Office 2000.
>>
>>>Your problem is probably different versions of Word on your client's box than what's on your dev box. Unfortunately, there are slight differences in how Word is opened in Word 2000 vs Word 2003. Which do you have and which does your client have?
>>>
>>>~~Bonnie
>>>
>>>
>>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform