Hi everyone,
I'm trying to execute a simple vbscript from php. It must convert a file '.doc' in a file '.htm' using Word.
It must work on server side.
It works if I execute it from command line with:
C:/cscript c:/script/doc_htm.vbs
but when I call it from php it doesn't work. The instruction that I use is:
exec("cscript c:/script/doc_htm.vbs"
The script is:
infile="D:\Word\index.doc"
outfile="D:\Word\word2"
Dim obj
Set obj = CreateObject("Word.Application"
obj.Visible = FALSE
obj.Documents.Open(infile)
obj.ActiveDocument.SaveAs outfile&"\index.htm", 8
obj.Quit
Could anyone help me?
Thank you.
I'm trying to execute a simple vbscript from php. It must convert a file '.doc' in a file '.htm' using Word.
It must work on server side.
It works if I execute it from command line with:
C:/cscript c:/script/doc_htm.vbs
but when I call it from php it doesn't work. The instruction that I use is:
exec("cscript c:/script/doc_htm.vbs"
The script is:
infile="D:\Word\index.doc"
outfile="D:\Word\word2"
Dim obj
Set obj = CreateObject("Word.Application"
obj.Visible = FALSE
obj.Documents.Open(infile)
obj.ActiveDocument.SaveAs outfile&"\index.htm", 8
obj.Quit
Could anyone help me?
Thank you.