asp running word server side using dll 
Author Message
 asp running word server side using dll

I have a dll I built to create a word doc from a database.   It runs clean
with no error when invoked from a VB app, but when I try to use it from ASP
it chokes when I reference the document.  I can see that it is running word
from the task manager.  I am getting bald too fast for this,, any help ?

Public Sub bPrintWord()
On Error GoTo HANDLER
    Set oApp1 = New Word.Application
    Set oWord = New Word.Document
'the dll spits up on the following line  ( file does exist
    Set oWord = oApp1.Documents.Open(sFile & "1.doc")
    oWord.Application.Selection.TypeText "test"
    oWord.SaveAs "sFile & ".doc"
    GoTo CLEANUP
    Exit Sub
HANDLER:
    App.LogEvent "DLL ERROR:" & i & vbTab & Err.Source & vbTab & Err.Number
& " " & Err.Description & " "
CLEANUP:
    On Error Resume Next
    oWord.Close
    Set oWord = Nothing
    oApp1.Quit
    Set oApp1 = Nothing
End Sub



Thu, 25 Jul 2002 03:00:00 GMT  
 asp running word server side using dll
A couple of possibilities... the Web server user (IUSR_<machinename>)
doesn't have sufficient permissions to write in the directory or to execute
Word's DLLs. Also, is it possible that Word is trying to put up a dialog box
or other message that is making ASP choke?

There's an article here that might help:

http://www.15seconds.com/issue/980916.htm

Ken


Quote:
> I have a dll I built to create a word doc from a database.   It runs clean
> with no error when invoked from a VB app, but when I try to use it from
ASP
> it chokes when I reference the document.  I can see that it is running
word
> from the task manager.  I am getting bald too fast for this,, any help ?

> Public Sub bPrintWord()
> On Error GoTo HANDLER
>     Set oApp1 = New Word.Application
>     Set oWord = New Word.Document
> 'the dll spits up on the following line  ( file does exist
>     Set oWord = oApp1.Documents.Open(sFile & "1.doc")
>     oWord.Application.Selection.TypeText "test"
>     oWord.SaveAs "sFile & ".doc"
>     GoTo CLEANUP
>     Exit Sub
> HANDLER:
>     App.LogEvent "DLL ERROR:" & i & vbTab & Err.Source & vbTab &
Err.Number
> & " " & Err.Description & " "
> CLEANUP:
>     On Error Resume Next
>     oWord.Close
>     Set oWord = Nothing
>     oApp1.Quit
>     Set oApp1 = Nothing
> End Sub



Thu, 25 Jul 2002 03:00:00 GMT  
 asp running word server side using dll
I suspect it is a permissions problem - but not on write or execute dll's -
more on been able to run Word itself -

Generally no user will be logged onto the machine so Word is probably being
launched under a user account whose "user hive" hasn't been loaded - because
no one's logged on.

I recently had a similar problem. It worked fine on the local machine
because I was logged in but when I transferred to the Webserver Word
appeared to launch but tripped up when it tried to open a document - I found
reading this article helped to solve the problem.

http://support.microsoft.com/support/kb/articles/Q224/3/38.asp

good luck

Simon

Quote:

>A couple of possibilities... the Web server user (IUSR_<machinename>)
>doesn't have sufficient permissions to write in the directory or to execute
>Word's DLLs. Also, is it possible that Word is trying to put up a dialog
box
>or other message that is making ASP choke?

>There's an article here that might help:

>http://www.15seconds.com/issue/980916.htm

>Ken



Fri, 26 Jul 2002 03:00:00 GMT  
 asp running word server side using dll
I can not visit http://www.15seconds.com/issue/980916.htm
Is the spelling okay please?
Thanks

Beny



Fri, 26 Jul 2002 03:00:00 GMT  
 asp running word server side using dll
works ok here (the link that is :)


Quote:
> I can not visit http://www.15seconds.com/issue/980916.htm
> Is the spelling okay please?
> Thanks

> Beny



Sat, 27 Jul 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. asp running word server side using dll

2. Use ASP to run server-side VB .exe

3. ASP run server side VB .exe program

4. Server side (asp) ActiveX dll calls problem (Form open)

5. Accessing Server side DLL's in ASP

6. ASP referring to server side variables in client side script

7. Server side ASP programming using JScript only

8. Using server side ASP to capture and parse HTML pages from any URL

9. DLLs -- server-side vs client-side

10. Using complex data types from VB ActiveX dlls with server-side scripting

11. Installing/Using a server-side VB ActiveX DLL

12. Using complex data types from VB ActiveX dlls with server-side scripting

 

 
Powered by phpBB® Forum Software