XML/XSL Portal

Multiple Stylesheet Aware
HideXML TutorialHide
     
  
 
 

HTML to DOC

People always want documents in a different format. If you have Microsoft Word this utility will get you a long way to a lot of formats.

All it does is load an HTML file into Word and save it using the output filters of Word. The documentation is a bit vague on what the constants/index for the file formats are so you might have to get notepad out and edit this file if you want some other format or if you use .TXT as your output format. If you know the integer constant/index of the file format you want then this can be given as a parameter to htmltodoc.js

Download

Depending on how you have scripting set up one of the following 3 methods will convert html to another format.

cscript htmlTOdoc.js htmlfile outfile {fileFormat}

wscript htmlTOdoc.js htmlfile outfile {fileFormat}

htmlTOdoc.js htmlfile outfile {fileFormat}

If you want to find the output formats that Word supports then here is a utility that will dump them to a text file formats.txt.

Download

Here is a typical result. As you can see they don't actualy make much sense so you will have to experiment. Any help here appreciated!

1Text with Layout ans
2 MS-DOS Text with Layout asc
3 WordPerfect 5.x for Windows doc
4 WordPerfect 5.1 for DOS doc
5 WordPerfect 5.0 doc
6 WordPerfect 5.0 Secondary File doc
7 WordPerfect 5.1 or 5.2 Secondary File doc
8 Word 5.1 for Macintosh mcw
9 Word 5.0 for Macintosh mcw
10 Word 4.0 for Macintosh mcw
11 Word 97 & 6.0/95 Vietnamese Converter RTF
12 Word 97 & 6.0/95 Thai Converter RTF
13 Word 97-2000 & 6.0/95 - RTF doc
14 Word 6.0/95 doc
15 Word 2.x for Windows doc
16 Works 4.0 for Windows wps
17 Recover Text from Any File *
18 Lotus 1-2-3 wk1 wk3 wk4
19 Microsoft Excel Worksheet xls xlw
20 Word 4.0 - 5.1 for Macintosh mcw
21 WordPerfect 6.x wpd doc
22 WordPerfect 5.x doc
23 Schedule+ Contacts scd
24 Outlook Address Book olk
25 Personal Address Book pab
26 Works for Windows 3.0 wps
27 Word 5.x for Macintosh (SweetJAM) mcw

 
 
  
     
Open

Delete

View XML
View XSL