Is there a way to export Word styles as CSS?

8

3

We have a standard document template in word for internal documents. The Graphic Design / Technical Writing staff have all the styles rigged such that we don't have to do any formatting ourselves.

There are some HTML pages we're looking at publishing to our website that we'd really like to be styled the same way as word documents using the template. The styles aren't all that complex, so recreating them in CSS from scratch is possible, if time consuming. So, is it possible to get Word to export the Styles in a document to a CSS file?

Electrons_Ahoy

Posted 2010-06-04T17:10:53.497

Reputation: 2 491

Answers

7

For the record, this is what I ended up with:

(This all applies to Word 2003, other versions should be similar.)

Under File, choose "Save as Web Page."

In the format pull-down, choose "filtered web page" and save as a .htm file.

Th HTML that gets kicked out is pretty terrible, BUT at the very top of the document is all of the CSS styles in one style block. Ignoring the slightly strange class names, the CSS isn't bad. I found you could just pull that css block out, drop it in a .css file, and html pages pointing at it actually looked just like the word docs.

(And, it already works in IE!)

Clunky, but it works.

Electrons_Ahoy

Posted 2010-06-04T17:10:53.497

Reputation: 2 491

0

I believe Word as an Export as HTML or Save as HTML option.

When I started in web work (~2002) the output from this was abhorrent.

I would manually skin the styles in CSS. If it's not that complicated then it should be no problem at all for someone competent in HTML / CSS.

Josh K

Posted 2010-06-04T17:10:53.497

Reputation: 11 754

0

Late reply, but this export a word document may help better than the built in functionality. It is its own tool and I don't know a ton about css, but it looks like it is doing the job.

Here is the link - http://msdn.microsoft.com/en-us/library/aa140221(v=office.10).aspx#odc_expwordtoxml_styleobj

Ben Jones

Posted 2010-06-04T17:10:53.497

Reputation: 509

Hmmm. I just tried that and the XML output is even worse than the HTML output, which I wound't have though possible. – Electrons_Ahoy – 2010-12-13T20:56:22.033