J
Justin
Hello. I am having problem with Office automation / ASP / IIS.
I have an ASP page on a Windows 2000 Server running IIS. I have Office
2002 Standard installed on this as well. What I am trying to do is
automate word and excel to:
1) Open a document located on a novell server
2) Print the document to a pdf printer, which saves the file as a pdf
in a location on the server
3) close word/excel
The ASP page then loads the pdf to display the information to the
user.
On the Windows 2000 server, I have IIS setup to use an account that
has the proper priviliges and rights to use resources on the server,
and the novell server (at least I think I do.) Also, I used DCOMCNFG
to setup Word to run as this administrative-level user and changed
default access and default launch permission accordingly (based on a
Microsoft KB article).
Here is the code I use in word:
---------------------------------------
'WORD AUTOMATION
Dim objWord
Set objWord = CreateObject("Word.Application")
objWord.Documents.Open fileName, false, true, false
objWord.Application.DisplayAlerts = 0
objWord.Application.ActivePrinter = "PDF995"
objWord.Application.PrintOut true,,0,,,,,1
objWord.ActiveDocument.Close false
objWord.Quit
Set objWord = Nothing
---------------------------------------
I use similiar code to automate excel.
The error I get is on the line that calls the Documents.Open method,
if I am trying to access a file on the Novell server. The word process
simply hangs. And, because of this, the entire website stops
responding. When I try to use that same code in the VBA editor in
word, and execute it there, I can step through to the line
Documents.Open, and when it calls that line, it just hangs there. It
works if I try to call a local file located on the server. It also
works if I open Word and select file open to try to access a file on
the Novell server. I can manually open a file, so I have permission to
do so (when logged in as the appropriate user, the same user that IIS
is setup to use as the anonymous user).
In Word I get that hanging problem, and when trying to automate excel,
it gives me this:
---------------------------------------
Microsoft Excel error '800a03ec'
'\\servername\sys1\folder\file.xls' could not be found. Check the
spelling of the file name, and verify that the file location is
correct.
If you are trying to open the file from your list of most recently
used files on the File menu, make sure that the file has not been
renamed, moved, or deleted.
---------------------------------------
Here's the kicker - This worked flawlessly up until Windows 2000
Service Pack 4 was installed on the Windows 2000 Server. Since then, I
have had this hanging problem. I am completely bewildered at this
point.
Any, and I mean any help would be greatly appeciated!
Thanks!
Justin
I have an ASP page on a Windows 2000 Server running IIS. I have Office
2002 Standard installed on this as well. What I am trying to do is
automate word and excel to:
1) Open a document located on a novell server
2) Print the document to a pdf printer, which saves the file as a pdf
in a location on the server
3) close word/excel
The ASP page then loads the pdf to display the information to the
user.
On the Windows 2000 server, I have IIS setup to use an account that
has the proper priviliges and rights to use resources on the server,
and the novell server (at least I think I do.) Also, I used DCOMCNFG
to setup Word to run as this administrative-level user and changed
default access and default launch permission accordingly (based on a
Microsoft KB article).
Here is the code I use in word:
---------------------------------------
'WORD AUTOMATION
Dim objWord
Set objWord = CreateObject("Word.Application")
objWord.Documents.Open fileName, false, true, false
objWord.Application.DisplayAlerts = 0
objWord.Application.ActivePrinter = "PDF995"
objWord.Application.PrintOut true,,0,,,,,1
objWord.ActiveDocument.Close false
objWord.Quit
Set objWord = Nothing
---------------------------------------
I use similiar code to automate excel.
The error I get is on the line that calls the Documents.Open method,
if I am trying to access a file on the Novell server. The word process
simply hangs. And, because of this, the entire website stops
responding. When I try to use that same code in the VBA editor in
word, and execute it there, I can step through to the line
Documents.Open, and when it calls that line, it just hangs there. It
works if I try to call a local file located on the server. It also
works if I open Word and select file open to try to access a file on
the Novell server. I can manually open a file, so I have permission to
do so (when logged in as the appropriate user, the same user that IIS
is setup to use as the anonymous user).
In Word I get that hanging problem, and when trying to automate excel,
it gives me this:
---------------------------------------
Microsoft Excel error '800a03ec'
'\\servername\sys1\folder\file.xls' could not be found. Check the
spelling of the file name, and verify that the file location is
correct.
If you are trying to open the file from your list of most recently
used files on the File menu, make sure that the file has not been
renamed, moved, or deleted.
---------------------------------------
Here's the kicker - This worked flawlessly up until Windows 2000
Service Pack 4 was installed on the Windows 2000 Server. Since then, I
have had this hanging problem. I am completely bewildered at this
point.
Any, and I mean any help would be greatly appeciated!
Thanks!
Justin