Posted on 16 July, 2009 By Kim Woodbridge 42 Comments

Don’t Paste Content from Microsoft Word into the WordPress Visual Editor

Paste (by SierraBlair)

I incorrectly assumed that it was common knowledge to not paste content from Microsoft Word directly into the WordPress Visual editor but I encounter problems related to this issue so frequently that I thought I should do a quick write-up about the issue.

When you copy and paste content from Microsoft Word, it attempts to preserve the formatting and adds sorts of “ugly” formatting code into the WordPress editor. Frequently this results in the page not displaying properly in Internet Explorer. (It amuses me to no end that Microsoft’s web browser can’t deal with it’s Word Processor formatting code. For some reason Firefox is able to work around it.) So, someone will come to me and tell me that the formatting on the page is messed up or that the sidebar is in the wrong location. It isn’t actually a layout or WordPress code issue but rather that formatting code from Microsoft Word is affecting the layout.

When you use the Visual Editor you won’t see the formatting code. You can, however, determine if this is the problem by switching to the html editor or viewing the source code in the web browser. If you see code that looks like the following, then you can be confident that the Microsoft Word formatting is the cause of the problem.

<p class="MsoNormal" style="margin: 0in 0in 10pt;">
<span style="font-size: small;">Some text here.</span>
<span style="mso-spacerun: yes;"> Some more text here. </span>
<span style="mso-spacerun: yes;">And some more.  </span>

The class and styles that start with Mso giveaway that the content was pasted directly from Microsoft Word. If that class and span information is removed, the formatting problem is corrected.

So, what do you do if you have a lot of content in Word that you want to post on your WordPress site?

  1. Use the paste from Word button the toolbar. You need to click on the Kitchen Sink button to see it.
    visual
  2. Paste the Word content into a text editor like Notepad and then copy and paste it into WordPress.

Have you ever run into this type of formatting problem? Personally I haven’t because I don’t use Microsoft Office and I don’t use the Visual Editor but I encounter this issue almost weekly.

photo credit: SierraBlair


Related Posts:
  • 8 WordPress Spring Cleaning Tips: Backups and More
  • Digging Into WordPress – Giveaway!!!
  • Don’t Let Your WordPress Customizations Get the Best of You
  • (Anti) Social Lists 12/27/09
  • How to Link NextGEN Gallery Images to an Individual Page or Post in WordPress
  • Posted In : WordPress Tips
    If you enjoyed this post, please subscribe to my RSS Feed

    Post to Twitter   Post to Delicious   Post to StumbleUpon

    42 Responses to “Don’t Paste Content from Microsoft Word into the WordPress Visual Editor”

    Leave a Comment
    You may use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .


    Recent Comments

      • Kim Woodbridge: Hi Dean - Thanks! I'm just glad I got the punctuation right - I've been having a rough week with typos ......
      • Kim Woodbridge: Hi Jim - What's not to love about Mr T?...
      • Kim Woodbridge: Hi - Thanks for visiting! It is funny :-)...
      • Dean Dwyer: Ah the power of the comma. It's April, Fools. Who knew punctuation could be so funny. Thanks for the smile....
      • Kim Woodbridge: Hi Christine - Awesome! Ooh ... something shiny ;-)...
      • Kim Woodbridge: Hi - I wish Twitter lists had started sooner. I've worked on them some but I'm having a hard time finding the time to w...
      • Christine: This has been driving me crazy for... maybe forever! I created too many lists and deleting them was not exactly clear -...
      • Ching Ya: Honestly I can't think of a way to live without lists. :-) Twitter lists, Facebook lists.. all of these have helped me a...