have you put the interop file on the server? you have office installed on the server. but you may not have the interop file which is required for .net compilation on that server.
On Mon, Apr 13, 2009 at 3:40 AM, zeki nadir aykose <[email protected]> wrote: > Did you share this file: > \\192.168.50.11\kdrive\Forms\EHS\EMPLOYEE_STATEMENTS.doc > > > > 2009/4/10 RBoyle <[email protected]> >> >> Here is my Imports statement at the top of the code behind: >> >> Imports Microsoft.Office.Interop.Word >> >> Here is one of the functions where I'm calling the class >> >> Sub PrintEmployeeState() >> >> 'Dim strFileName As String >> Dim word As New Microsoft.Office.Interop.Word.Application >> Dim doc As Microsoft.Office.Interop.Word.Document >> >> >> doc = word.Documents.Open("\\192.168.50.11\kdrive\Forms\EHS >> \EMPLOYEE_STATEMENTS.doc") >> >> doc.PrintOut() >> doc.Close() >> >> End Sub >> >> ** Why is it working perfect when I process it on my local machine, I >> post it to the server, and it goes down the tolet and fires off an >> exeption error. Below is the error message that it fires off on the >> page load: >> >> >> Server Error in '/EHSAccidentNearMiss' Application. >> >> -------------------------------------------------------------------------------- >> >> Compilation Error >> Description: An error occurred during the compilation of a resource >> required to service this request. Please review the following specific >> error details and modify your source code appropriately. >> >> Compiler Error Message: BC30002: Type >> 'Microsoft.Office.Interop.Word.Application' is not defined. >> >> Source Error: >> >> >> >> Line 338: >> Line 339: 'Dim strFileName As String >> Line 340: Dim word As New >> Microsoft.Office.Interop.Word.Application >> Line 341: Dim doc As Microsoft.Office.Interop.Word.Document >> Line 342: >> >> >> Source File: c:\inetpub\wwwroot\EHSAccidentNearMiss >> \AccidentNMForm.aspx.vb Line: 340 >> >> Any ideas -- thanks for everyones help ahead of time!! >> >> Ryan > > -- Best Regards, David Shen
