WORD and WordPress

Many bloggers don’t comprehend that Microsoft Word is a word processing program that’s not compliant with web standards. They also don’t realize that a word processors and web editors do not operate the same way. The result of copy and pasting from Microsoft Word into the Tiny MCE editor in WordPress blogs can be unexpected, unless you know how to use the built-in features in the Visual editor for using Word cleanly.

By using the correct W “paste from Word”  icon in Row 2 of the Visual editor and pasting the text from Microsoft Word into the pop-up box, the bulk of non compliant code is automatically stripped out, so what’s inserted into your post or page is clean HTML.  The same goes for using the T “paste as Plain Text” icon and pop-up to strip extraneous and non-compliant code you have copied from elsewhere before inserting into your post or page.

Since Word is meant for print media, it does not speak “web” and the codes used in Word can actually break your blog, and send the sidebar below posts, or result in all your text becoming bold or italicized or worse.

If your sidebar has fallen and is displaying below your posts due to copying and pasting or as a result of importing text containing invalid HTML you can rectify that. Typically this is caused by an open HTML tag in one of your posts or in a text widget.

Go to Settings > Writing and select “ ___ WordPress should correct invalidly nested XHTML automatically” and then scroll down and click “Save Changes.”Starting with your latest post, open it in the editor, make one minor change such as adding a space and then deleting it, and then click “Update Post.” Check your blog and see if it is back to normal.If it’s not, then look for an open HTML tag and close it.

  • for every < there is a > <something>
  • for every < > start there must be a </> close

Check your blog again and see if it is back to normal. If it’s still “messed up” then open the next post and do the same thing post by post until it goes back to normal.

If that doesn’t solve the problem you can trying chnaging all your recent posts on the front page of your blog to Drafts, go to Posts > All Posts, tick the little square to the left of “Title” to select all the posts on the screen, select Edit from the Bulk Actions pulldown, click Apply, select Draft from the Status pulldown, click Update; then select Published and click Update again.

Note: All WordPress bloggers ought to have that setting enabled on their blog.

Word is great for print media, and sometimes for other sorts of communication (email), but as it does not speak “web”, a better choice is to use an off-line editor such as Windows Live Writer.  Using Windows Live Writer allows you to write your posts offline and publish them to your blog without any hassle.

31 thoughts on “WORD and WordPress

  1. Pingback: One very cool really hot site for WordPress bloggers | The Balsamean

  2. Pingback: Saving Your Drafts in WordPress | A Daily Life

  3. Dear TimeThief,
    I don’t have much problem with Copy & Pasting from MSWord to be honest.
    It does present my writing with a lot extra paragraph spaces though after pasting directly into the WordPress editor. I then hit the Browser’s [ Refresh ] button; followed by [ Save Draft ] and ‘everything settles down’.

    Must admit that I do work in both screens: the Visual and the HTML. The visual for pasting ‘normal texts’ and for editing; the HTML for directly pasting code.

    Thanks for the Windows Live Writer tip. Might try it out. Just out of curiosity. :-)

    Greetings, Evita

    • I use both editors as well. Provided you have enabled the setting on your Writing page the software will correct invalidly nested HTML. However, if one does not use the correct icons over time they will have a problem and in some cases it will be a nightmare to locate and correct them.

  4. These are extremely helpful tips, Timethief. I do a lot of my writing in Word and then copy and paste it into a text editor before moving it to WordPress. I read somewhere (can’t recall where) a while back that Word and WordPress don’t get along. Word carries a lot of extra code that’s just not good for web pages. It’s too bad that Word can actually break WordPress.

    • Hi Allyson,
      Word does not break WordPress.com software per say. If you enable the ” ___ WordPress should correct invalidly nested XHTML automatically” and then scroll down and click “Save Changes.” on the Writing page when you first get a blog WordPress will do the job.

      If you don’t then copying and pasting from WORD can however break your layout and send the sidebar under your posts, change all your font sizes and colors, italics, bolding, etc.

      What we Volunteers answering support forum questions note is bloggers who fail to enable that setting, and who fail to use the correct icons the editor to strip the junk code out will create a problem over time that will become a PITA to locate and correct later on.

  5. Pingback: WordPress Formatting and Spacing « one cool site

  6. Hi TT,

    I write all of my drafts in Word. It’s what I’m used to using, but I don’t do any formatting from within the application when I’m writing for the Web. When the draft is ready, I paste the text into the HTML tab of the post editor. I then click the Visual tab to insert my images, add hyperlinks, and format the post.

    Ray

    • Hi Ray,
      Have you enabled “ ___ WordPress should correct invalidly nested XHTML automatically” on your writing page? If so then the software will automatically correct any invalid HTML.

  7. This is so good to know, thank you TT! I have always typed into the WP editor first, after which I copy and paste it into Word. XHTML and the necessity of knowing that this is too much for me to cope with.
    The Save Draft and Preview buttons, not to mention Edit, are my guiding hands. Will explore Window Live Writer for those offline times.

    • Hi Patti,
      The great thing about Windows Live Writer aside from producing clean code is that when you use it to publish your blog pages and posts a backup of it is automatically created on your own computer. As long as you enable “ ___ WordPress should correct invalidly nested XHTML automatically” on your writing page the software will correct any invalidly nested HTML automatically. However, it’s not retroactive.

  8. Do you have similar EXTREMELY-USEFUL-THANKS information for inserting images in posts? I go crazy and lose inordinant volumes of time adjusting and tweaking images/photos into my posts and pages … it’s almost frustrating enough to make me STOP using imagery at all, which I know is NOT THE WAY TO GO.

  9. Pingback: Paste From Word « Light Reading

  10. Useful article, and although I never use the Visual Editor, I am glad to know that I can tell others that there are these options.

    I tried Paste from Word as an experiment just now – and if someone asks me in the future, I can say that I have seen the results for myself.

    For those using Macs, there is little utility program named TextEdit that comes bundled with Macs that can help.

    I have the TextEdit preferences set to ‘plain text’ and it strips out the coding from Word documents or other sources.

    • @Dave,
      I really appreciate how you picked up the ball so to speak and expanded on my post by experimenting and publishing your results. I don’t have a Mac and was very appreciative of the additional information on TextEDit that you provided. Thank you. :)

    • There’s an even simpler solution for Mac users: Cmd-V to copy from Word, then Cmd-Alt-Shift-V to paste. It strips the text formatting before pasting. It’s a shame Microsoft Windows doesn’t have something as simple as that built in.

  11. Thanks for the info. I had noticed that Word was doing some weird things to my blog or to the post when I posted directly from it to WordPress. Lately, I use Windows Live Writer or I type directly into WordPress’ editor. Also thanks for letting us know about the setting. All the best :)

    • @Kinna,
      I have seen some royally messed up blogs that were a result of copying and pasting from Word. Others were a result of copying and pasting from other sites that had invalid HTML. Straightening them out was not an easy task. It required a lot of source code reading and editing to achieve. It was too bad the bloggers didn’t know about the setting on their Writing page and didn’t know how to use the editor icons to strip our the mess before publishing. If they had known it never would have happened, and the time they had to spend correcting the mess could have been devoted to creating content. Best wishes with your blog. :)

  12. Wow, those are some weird things that could happen by pasting directly from Word. I don’t use it for my blog, instead I either write directly into the visual editor (I like to be in the blog itself when I post, makes me feel like I’m writing ‘live’) or via Notepad.

    There is way to post from notepad straight into the visual editor without using the icon that strips out rich text and that is to click the ‘edit’ button in notepad and uncheck ‘word wrap’ then copy and paste it in. All the posts that I compose as text I do that way. If word-wrap is checked then it certainly has to go via the T (text format-stripping) button and I don’t have the patience for that, lol!

    Great post – and one that’s needed by a lot of bloggers who don’t realise the ‘workings’ here. :)

    • Hi Val,
      Typically members how up in the forum after they have been copying and pasting lost of stuff from WORD or elsewhere without doing the enabling of the “WordPress should correct invalidly nested XHTML automatically” feature on the Writing page. We all ought to enable this feature on our blogs. By the time they show up on the forum their blogs are a mess. If they have not been doing this for long then the process I posted will correct most if not all of the messed up posts. If they have been doing it for ages the effect can be cumulative and then they have to locate the “problem” post or post and enter the HTML editor and fix it.

      I used to use Windows Live Writer and still highly recommend it but lately I have been typing directly into the editor. I switch back and forth between the Visual and HTML editors. If you are using a plain text editor then you don’t need to use the icons and strip any code because there won’t be anything to strip out.

      Thanks for commenting. I’ll be doing some very brief posts like this in the future. :)

    • I think that a lot of bloggers don’t realize this based on how many end up in the support forum with messed up blogs. When you copy and paste text from Word or from anywhere else it’s important that you use the correct icons in the editor to clean up the code and then insert it.

    • Eu falo apenas Inglês e eu estou usando o Google Translate por isso peço desculpa por eventuais erros. Está muito bem-vindos e observe também o ícone ao lado T é para qualquer texto que você copiar e colar de outro lugar.
      Saúde

Comments are closed.