Hi all,
The following script works like a charm on my workstation
<dummy_script.vbs>
Dim objExcel
Dim objWorkBook
Set objExcel = CreateObject("EXCEL.APPLIC
ATION")
Set objWorkBook = objExcel.Workbooks.Open("C
:\test\tes
t.xls")
objWorkBook.SaveAs ("C:\test\test2.xls")
objWorkBook.Close True
Set objWorkBook = Nothing
Set objExcel = Nothing
</dummy_script.vbs>
It used to work on a server that generates XL files on the fly and sends them by email upon request in an intranet application.
The code above is just a sample, the actual app is VB6 and involves DB access, running macros, ...
Trying to narrow the scope I found out that the simple script above does not work any more on the server.
The test.xls file is the most simple XL file ever, and the path is OK
The NT account I use definitely has write permissions on the target directory, and test2.xls does not exist when I run the script.
Excel is installed on the server and works normally when used as a client app.
But it seems to fail miserabily when used as an activeX object. The script above says it can't find the file, but both the directory and the fiel definitely exist on the server.
I also checked that the script does not fail due to a ghost/remanant excel.exe process in memory,
using windows toolkit (tlist, kill, ...) : no ghost excel.exe ...
Any ideas what could break / alter the way excel works when used as an activeX object from another App/Script ?
Any comments welcome
Hilaire
Start Free Trial