Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execution of vbscript inside php

Status
Not open for further replies.

pirimor

Programmer
Apr 24, 2003
5
IT
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 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top