Strange Bedfellows, MS Word + WordPress
Microsoft Word and WordPress make strange bedfellows at first gape. However our clients have increased productivity significantly by speeding up the blogging process with clever use of MS Word (Office 2003 and 2007). Anyone who has ever tried to paste formatted text from Word to WordPress and observed the awful results is probably wondering exactly what the heck this post is about.
Linking and Text Scraping is Much Easier with Word.
It’s true that you can’t select fonts, bold, italic, images, or other fancy typography tricks in Word and successfully paste content into the WP visual editor. However there is a method to compose text and create links in Word, clean the formatting, and successfully paste the copy into WP while maintaining the link-formatting integrity.
This is especially useful when creating lists of blog post links and scraping text during the research process. The main advantages to Word, aside from tools like thesaurus and other professional grade text composition tools, are that links can be created very quickly and scraped text (excerpts from other blog posts) can be cleaned very quickly with link formatting and anchor text preserved. This is a huge time saver. The trade-off is that the link syntax is not strictly XHTML compliant (missing link description) though the methods outlined herein parse just fine for mobile.
Visual Editor Quirks
Most tutorials on optimizing and operating WordPress blogs recommend turning off the visual editor and going with code view when writing or editing posts. This is understandable because the WP visual editor has some quirky idiosyncrasies which, if not managed carefully, can trash the formatting of any entire WP page the post is located on. For those who prefer writing in Word, a common method is to first paste the copy into and cut out of a basic text editor like notepad. The downside to the notepad approach is that any hyperlinks created in Word are erased.
Paste it into Word. Don’t worry that the Word doc looks like a mish mash of ugly formatting. We’ll clean that up later.
Another option is to copy a URL from the browser window and use the “Insert Hyperlink” command in Word to make any anchor text a link. Simply highlight the anchor text in Word you wish to link from. Right click, chose insert hyperlink, and paste or type in a link.
Clean it Up for WordPress.
After your done creating your post in Word then it’s important to clean out all of the word junk by clearing the formatting. The links will not be removed. The screen captures here are from a Vista box running Word 2007, but the Clear Formatting function in Office 2003 works just fine.
Select all of the text on the page and clear the formatting. In Word 2003 the function is located under View/Formating/Clear- Formatting. In Word 2007, the command is the little eraser icon as illustrated here.
Now You’re Ready For WP.
Then you’re ready to paste the text into your WP visual editor. It’s important that EVERY shred of text created in Word be cleaned by format clearing. That said, there is still some funny code-level stuff left which you can see in WP after pasting text into the visual editor and viewing the post in code view I.E… <p class=”MsoNormal”>. This code does not show up in WP posts and is not a problem. Every post in this blog was composed and pasted from Word, links intact. The only downside is that there is no link description associated with anchor text which means aimClearBlog is not strictly XHTML compliant. However the site still works well in mobile.
Don’t forget to quickly check your post in both IE and FireFox. Every once and a great while (rarely) IE parses posts created by this method requiring a slight tweak in code view. The only code shrapnel I’ve ever found that’s a problem is <!–[if !supportLineBreakNewLine]–>.
WordPress: The Complete Post-Install Checklist