Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.odbcnet
Problems involing ms-word from .net
Robin Prosch via .NET 247
5/15/2005 12:22:00 PM
I'm developing in VS.Net 2003 on an XP-Pro machine with Office 2000 installed. My code for kicking off a Word instance is:-
Dim wdApp As New Word.Application
Dim wdDoc As Word.Document
wdDoc = wdApp.Documents.Open(sTemplateDoc, False, True)
etc...
The Word 'import' is via MSWORD9.OLB
This works fine on my machine and it installs and works on a Win98/Office 2000 combo but on a WinXP/OfficeXP combo, the "wdDoc = wdApp..." statement falls over with "Failed to load resources from resource file..."
Research on the Web suggested that I install the Office XP PIAs - which I did. On both the Office200 machine and the OfficeXP machine the result is a QueryInterface error. Not only that, uninstalling the PIAs has zero effect, the only way that I could restore my app to a working state was to rollback to a previous registry version...
The exact same app also launches Excel using:-
Dim xlApp As New Excel.Application
Dim xlBook As Excel.Workbook = xlApp.Workbooks.Add
Dim xlWorksheet As Excel.Worksheet = _
CType(xlBook.Worksheets(1), Excel.Worksheet)
With xlBook.PivotCaches.Add(XlPivotTableSourceType.xlExternal)
.Connection = sBit1 & sBit2 & sBit3
.CommandType = XlCmdType.xlCmdSql
.CommandText = "SELECT rptTranAnal.dEffective, rptTranAnal.sTxCodeTrim,
<snip></snip>
.CreatePivotTable("", "BIBSpivot")
End With
Dim xlPivotSheet As Excel.Worksheet = xlApp.ActiveSheet
Dim xlPivotTable As Excel.PivotTable = xlPivotSheet.PivotTables("BIBSpivot")
etc... etc...
This works perfectly on both machines - No PIA installation required.
How can I persuade the XP machine to handle the Word invocation successfully??
TIA
Chris
--------------------------------
From: chris bentley
-----------------------
Posted by a user from .NET 247 (
http://www.dotn...
)
<Id>uenVNncaHkObWRPskBEeMA==</Id>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Problems involing ms-word from .net
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password