How to apply external CSS stylesheet to document in Microsoft Word?

6

2

Seems like there should be a simple answer here, but can't find it in Word Help, MS Office Online, or Google...

I simply want to be able to apply an external CSS stylesheet (standardstyles.css, e.g.) to the current document in Microsoft Word (2007). I've pored over the Styles menu, looked in all the classic formatting dialogs, but can't find anything.

Sean O

Posted 2009-11-03T16:58:28.667

Reputation: 820

Answers

3

Save your Word document as 'Web page (*.htm; *.html)'. This will give you a html document with an associated folder named after the document (e.g. Doc1.htm and Doc1_files).

Add your stylesheet to the folder and then link to it using:

'Developer' tab > Document Template > Linked CSS (tab) > Add...'

The css heading styles (h1, h2 etc.) in the stylesheet correspond to the heading styles applied within Word and the p style corresponds to the Word 'Normal' style. Similarly for lists and tables etc.

pelms

Posted 2009-11-03T16:58:28.667

Reputation: 8 283

This is awesome! I didn't even know this was an option, and now I have complete control over the appearance of the saved HTML. This still works in Word 2013, BTW. – Droj – 2015-09-23T19:03:47.887

Ah yes, I remember seeing this before. Sounds like what I'm looking for, but when I select a .CSS file, it doesn't update the current document (whether importing or linking), and the linked stylesheet disappears after saving & reloading the .DOCX document. Ideas? – Sean O – 2009-11-03T18:48:55.777

You need to save as a web page first. You can't apply a css stylesheet to a .docx file directly as it's not html. – pelms – 2009-11-04T16:11:47.290