BLOG

Strange Bedfellows, MS Word + WordPress

By

Blogging  /  Content

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.

It’s easy to create text and links in Word which won’t make WP puke. First scrape text (including linked anchor text) right from any browser window.1

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.

2

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.

3

Here you see the text all squeaky clean.
4

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 Resources:
WordPress: The Complete Post-Install Checklist

WordPress – From Install to Pimped Out

WordPress: The Complete Post-Install Checklist, Redux

A complete list of search engine friendly (SEO) WordPress plugins for your Blog

How To Configure WordPress Post-Installation

50+ Tools For The WordPress Admin

How to Install, Configure, and Use WordPress Plugins

-->

3 Comments

  1. Derek on July 31, 2007 at 1:09 pm

    Nice post Marty! There is nothing more fun than going back in to re-edit a post from someone copied in directly from Word.

  2. Marty Weintraub on August 2, 2007 at 10:50 am

    Yup…and all it takes is a second to make Word useful.

  3. craigsanatomy on July 17, 2008 at 5:13 pm

    New comment on an old post!

    …while I am not usually one to recommend Microsoft when open source (or just cooler) alternatives abound. I’ve really been impressed with Windows Live Writer. It combines the simplicity and ease of use of Word, with some added features for web (including alt text for links and images), and simple publishing to popular blog platforms like Blogger, TypePad, and WordPress.

Post a Comment

*

*