Howto – Blog using a Microsoft Word 2003 file

Since I use XP during my working day, I’ve found that most of the times, when I need to write a document it’s using Microsoft Word 2003. Now although Word is fine if the person your trying to communicate with is using word. Sometimes you need create an HTML document for on-line purposes, for example a blog. Here are some instructions on how to do just that!

Some caveats:

  1. Tables, basic formatting, and images are preserved as simple HTML.
  2. This requires .NET 2.0; which can be downloaded from the Microsoft Website here.

The HTML that word created is frankly, just plain bad, so what I usually do is:

  1. Create a directory on the root of the C: drive called temp.
  2. Save the document as an HTML filtered document in that directory (see picture below).
  3. Take note of what you’ve called your document, mine is called wordfile, yours could be called something entirely different.
    Save as html filtered
  4. Close the word document that you’ve just converted.
  5. Download the CleanWordHtml console application from Jeff Atwood website and extract the downloaded file to c:\temp
  6. Open up a command line window by navigating to Start, and then Run, and typing “cmd” (no quotes); then hit ENTER. Then, using the following commands; navigate to that folder and extract the files (Note that the text [ENTER] means hit the ENTER key):
    The Run command
  7. Where is says your-filename.htm below in step 8, use the filename that you took note of in step 3, remember to append the htm file extension to it.
  8. In the Command Prompt box type:

cd \
cd temp [Enter]
WordHtmlCleaner.exe your-filename.htm [Enter]

Command Prompt

The filename will be what you called it in Step 3, with the .modified.htm appended to it.
eg. My document was called wordfile.htm and the new improved file is called wordfile.modified.htm

Voila, you have now created a file that has all the Word Specific html formatting removed from it.

An example of nice clean HTML code ran through WordHTMLCleaner


Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Quisque sed felis. Aliquam sit amet felis. Mauris semper, velit semper laoreet
dictum, quam diam dictum urna, nec placerat elit nisl in quam. Etiam augue
pede, molestie eget, rhoncus at, convallis ut, eros. Aliquam pharetra. Nulla in
tellus eget odio sagittis blandit. Maecenas at nisl. Nullam lorem mi, eleifend
a, fringilla vel, semper at, ligula. Mauris eu wisi. Ut ante dui, aliquet nec,
congue non, accumsan sit amet, lectus. Mauris et mauris. Duis sed massa id mauris pretium venenatis. Suspendisse cursus velit vel ligula. Mauris elit. Donec
neque. Phasellus nec sapien quis pede facilisis suscipit. Aenean quis risus sit
amet eros volutpat ullamcorper. Ut a mi. Etiam nulla. Mauris interdum.
<ol type="1">
	<li>Do
a cartwheel.</li>
	<li>Sing
into your hairbrush.</li>
	<li>Walk
barefoot in wet grass.</li>
	<li>Play
a song you like really loud, over and over.</li>
	<li>Dot
all your is with smiley faces.</li>
	<li>Read
the funnies. Throw the rest of the paper away.</li>
	<li>Dunk
your cookies.</li>
	<li>Play
a game where you make up the rules as you go along.</li>
	<li>Step
carefully over sidewalk cracks.</li>
	<li>Change
into some play clothes.</li>
	<li>Try
to get someone to trade you a better sandwich.</li>
	<li>Eat
ice cream for breakfast.</li>
	<li>Kiss
a frog, just in case.</li>
	<li>Blow
the wrapper off a straw.</li>
	<li>Have
someone read you a story.</li>
	<li>Find
some pretty stones and save them.</li>
	<li>Wear
your favorite shirt with you favorite pants even if they dont match.</li>
	<li>Take
a running jump over a big puddle.</li>
	<li>Get
someone to buy you something you really dont need.</li>
	<li>Hide
your vegetables under your napkin.</li>
	<li>Stay
up past your bedtime.</li>
	<li>Eat
dessert first.</li>
	<li>Fuss
a little, then take a nap.</li>
	<li>Wear
red gym shoes.</li>
	<li>Put
way too much sugar on your cereal.</li>
	<li>Make
cool screeching noises every time you turn a corner.</li>
	<li>Giggle
a lot for no reason.</li>
	<li>Give
yourself a gold star for everything you do today.</li>
</ol>
Ancient
wisdom I just made up. . .
Okay,
<table border="1" cellPadding="0" cellSpacing="0">
<tr>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
</tr>
<tr>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
</tr>
<tr>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
<td width="114" vAlign="top">Something</td>
</tr>
</table>
<strong>A
list of intelligence</strong>
<ul type="disc">
	<li>2
chickens</li>
	<li>4
fish</li>
	<li>3
horses</li>
	<li>8
cows</li>
	<li>7
sheep</li>
	<li>13
eels</li>
	<li>4
crows</li>
	<li>9
men</li>
</ul>
And
not one of them was

<strong>Unordered
List</strong>
<ul type="disc">
	<li>Item
one</li>
	<li>Item
two</li>
</ul>
<strong>Ordered
List</strong>
<ol type="1">
	<li>Item
one</li>
	<li>Item
two</li>
</ol>

2 thoughts on “Howto – Blog using a Microsoft Word 2003 file

Leave a Reply