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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

save microsoft word as html

Status
Not open for further replies.

samit700

Programmer
Sep 23, 2003
52
0
0
US
Hi,

I am trying to write a VB script to save a specified microsoft word document as htm (filtered html) format. But I am getting an error. Could anyone please look into the syntax. I am not very familiar with VB so not sure whats wrong.

oDoc.SaveAs folderToSave & curFileName & ".htm", 10

The system complains "could not execute above command".
If I remove the ", 10" part it works, but since I need to save it in html, it needs to be there otherwise it saves in doc format.

Thanks in advance,
Samit
 
Have you tried 102 instead of 10 ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I tried it but I am getting the same error - "command failed" ... :-(
 
Oh! I found the problem. I am specifying the file format as "filtered html" but my version of word does not support this conversion. I am going to use fileformat=8 for simple html conversion ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top