VB Script Documents.Open throwing 424 error

opa5opa

New Member
So I have a vbs script:\[code\]Function test2open( sSourceFile, sPDFFile ) Dim wApp ' As Word.Application Dim wDoc ' As Word.Document logStream.writeline "inside test2open" on error resume next Set wApp = CreateObject("Word.Application") logStream.writeline Err.Number Err.Clear Set wDoc = wApp.Documents.Open("c:\Windows\Temp\test.DOC") logStream.writeline Err.Number logStream.writeline Err.Description logStream.writeline Err.Source wApp.Quit WdDoNotSaveChanges Set wApp = NothingEnd Function\[/code\]I'm calling this vi php exec call through apache with cscript.exe. The point of the main script which I'm not going to paste the whole thing is to convert a word doc to a pdf. But both my full script and the one above have the same issue.When I call the vbs script by itself while sitting on the windows box it works as I would think, but when called remotely through apache through php it errors on the Documents.Open call with 424 Error Object required Microsoft VBScript runtime error.This same exact code is running correctly on 2 other windows boxes which makes me think this is some kind of permission issue (love those description MS error messages). But I cannot figure out what. Any thoughts?
 
Back
Top