MS Word Files to HTML- Encoded Web Pages (via Interchange Format RTF)

1. Open your file (or create a file) with MS Word. Check it to make sure that it is the way you want it on the web page. The converter will do bold-face and italics, but not centering or tables. It will also take your footnotes and turn them into separate files, linked in the appropriate places with whatever markers MS Word used - either asterixes or numbers.

2. Go to the File menu and Save As Interchange Format (RTF), giving your doc a new filename unless you are willing to have the original destroyed. It is a good idea at this time to give the document a Unix-legit filename - preferrably one that ends in .rtf [*]

3. Close the document and launch the rtftohtml application. Go to "Open" in the "File" menu, find the rtf file using the Finder, and hit the "Open" button again. The program will convert your file from rtf to html, changing the filename to reflect the html change, and save it next to the file it began with (the rtf file). The program runs a dialog window that tells you what it is doing. It will say that errors were written to the file "filename.err" but unless there were errors to report, that file will not exist.

4. Quit rtftohtml and open the resulting html file with MS Word. Here you may want to make some changes. The rtftohtml program uses the filename as the title of the output file. This is the line of text that will appear in the header of the window when the file is loaded into a web browser. I like my titles a bit more descriptive, so I change them to something more useful.

The rtftohtml program also does not do headers. Instead, it simply turns section heads and titles inside the document into bold or italics. I like headers so I go through and change the boldface to <h3> or <h4> as appropriate.

This is also a good time to change the page background color from the standard, default grey, to white. Use this command in the <body> tag:

<body bgcolor=#ffffff">

5. At this point you must do two things: shorten the line lengths and re-save the file as text-only with line breaks.

To do the first, goto the "Edit" menu, "Replace" window. Type ^p in the "Find What" window and type a space in the "Replace With" window. When you hit the "Replace All" button, the document will become one, long line.

Now goto the "Format" menu, "Document" window and set the right margin to 2.5 inches. Then back to the "File" menu and "Save As" - "Text only with Line Breaks" - and overwrite (Replace) the original file. Close the document.

Now you are ready to upload the file to your server and check it out with your favorite browser.


(c)Copyright 1985, 1996 by Bruce Jones
Anyone is free to reproduce any of these documents in their entirety or parts thereof providing:
  1. Sections used are reproduced entirely and without alteration
  2. The following page footer is reproduced on each page:
    BJ's UNIX Primer - (c) Bruce Jones - 1985, 1996
  3. Full credit is noted somewhere in the reproduction
Bruce Jones 			Department of Communication
bjones@ucsd.edu			University of California, San Diego
(619) 534-0417/4410		9500 Gilman Drive
FAX (619) 534-7315		La Jolla, Ca. 92093-0503

Comments to: bjones@ucsd.edu


Return to:
Bruce Jones Homepage
BJ's Unix Primer Index
The CommWeb Homepage

This page last updated on: Feb 3 1997