Paragraph spacing when pasting MS Word text
I’m wondering what makes paragraph spacing tick. Sometimes when I copy and paste from Word ’03, I get the desired space between paragraphs.
But other times successive paragraphs have no space between them, both in the editor and on the finished page. And even using the Word Paste function in the editor doesn’t make any difference.
I never drag and drop, because I’ve learned that doing so brings a horrendous amount of MS Office mark-up with the text. Copy and Paste eliminates that, but the correct paragraph spacing comes through only sometimes, and seemingly randomly.
The blog I need help with is onfollowingchrist.wordpress.com.
Make sure you are using this procedure when pasting something from Word. Word does not speak HTML well at all, and pasting directly from Word can cause issues.
I should note that wordpress made a change a while back where they automatically strip out any word code when you paste directly into the editor, but in my experience it doesn’t always work as cleanly as it should. Of course the “paste from word” icon is known to miss a few things once in a while as well.
Thanks, TSP. I thought I noticed the last time I used the Word tool that all formatting was stripped. That’s a worse problem than having to add linefeeds after the fact, so I’m going to avoid that tool. I still haven’t figured out why some copy/paste jobs work perfectly and others not.
I have so many aids built into Word via macros and hotkeys that it’s the only way to go for me at this point, so that’s why I’m trying to solve this problem.
You may wish to use Windows Live Writer, which works similarly but maintains its formatting. Word will, by WP.com design, not work properly for formatting.
I have used WLW, and it’s pretty good, but as I said, Word’s macros and hotkeys absolutely rule here. What I don’t understand is why sometimes Word’s paragraph spacing is maintained, and other times not. If I understood that, I probably could ensure that it would happen regularly. I also don’t understand why this problem would exist “by WP design”.
One possibility would be if you had copied and pasted stuff from the web into a Word document, and then copied and pasted that into the wordpress editor. In cases like that, wordpress would strip out the messy and un-HTML Word code, but leave the inappropriate code that was brought into the mix from the web.
I have a friend who will routinely copy and paste bits from several sources on the web into Word then build his post around the stuff from the web and then paste it into the wordpress editor, and ends up with a mess.
I’ll keep that in mind, but it doesn’t seem to be the operative problem here. I checked my last three articles, at least one of which had the problem, and the only Web snippets among them were Bible verses pasted from http://www.blueletterbible.com‘s copy function. So I just ran a test on a new post using/not-using a Bible verse, with a page refresh between trials, and it made no difference (spacing was preserved in both cases, this time).
Will keep on looking for clues.
The interwebs is a strange and mysterious thing.
Ok, I have a little more light.
I understand now why there is a difference between copy/pasting and drag and dropping from Word to the WP editor. WP intentionally intercepts the c/p process to scrub the tons of garbage markup that MS insists on inflicting on the world, but d&d does an end-run around that utility.
I also found that it apparently is imported snippets that are messing up para spacing. This time, while in the WP editor I brought in Bible verses from Logos rather than blueletterbible, but as soon as I did the next linefeeds lacked the spacing the previous ones had. Because the drop-down para style box in the WP editor is pretty lame regarding changing existing text, the solution was to switch to html view and clean up the code there. Once I did that, successive new paras had the correct spacing again.
At that point I transferred over to Word and completed the piece. I then c/p’d over to the editor, and everything transferred beautifully. I think the key is to work very cleanly regarding linefeeds when changing para styles in Word.
The c/p operation maintains font markup such as bold or italic, but nukes styles, so that all styles come over as Paragraph (when in Word, I’m composing in .doc format, not html). So I have to go through and apply such styles as Blockquote manually. But that’s not too bad a task.
Bottom line: I need to keep style transitions from snippets clean, and there shouldn’t be much of a problem.
also, there is a blog format in Word [strong]made for blogging[/strong]
Sorry, come again on that?
Word 2007 supposedly has a “blogging” feature that works like an offline editor and you can upload posts directly from it. Originally I was under the impression it was producing very clean code, but after having to clean up some of the aftermath on a couple blogs, it isn’t as clean as I thought it was.
@raptor, it is still cleaner than pasting directly from MS Word, and I can’t rule out the possibility that the people unintentionally did something that I am unaware of, but I found errors going back a couple months so I’m suspect of it.
Open Office has a blogging feature as well, and as long as you don’t get to fancy with things it seems to work reasonably well, but it makes a mess if you include tables.
Ok, I see. I’m in Word ’03 anyway. Sounds like the Windows Live Writer concept. A very decent program, but it lacks the advanced power of Word.
Live writer is very good for blogging, and in my experience playing with it, it always produces clean code. The problem is with Word and the “advanced” formatting features it gives is that they do not always transfer over to HTML easily. You have to remember that MS Word is designed for print media, not for the web. It’s like using a screwdriver to hammer nails. You might get the nail hammered in, but it could get ugly.
More like a screw gun over a claw hammer. :) I’ve got this going so smoothly now that the only chore is converting all my quotes to blockquotes, which I have to do manually. Word’s Autocorrect feature alone, which I use to proactively expand abbreviations, is gold. And I do my composition on an eye-soothing gradient background. So I’m cool now, except I have to figure out a way to convert my “Quotes” style to blockquote.
Hmm, I think I just got it. I use an Auto-It script to add font color tags to each post, since my non-upgraded css doesn’t lend that option. I could place a flag in the text that would tell Auto-It which paras to convert, and then strip the flag.
Thanks for the idea! ;)
This is indeed sweet! Praise God!
Thanks everyone for your input. I’ve got an excellent solution to the problem – far greater in scope than I anticipated!
The topic ‘Paragraph spacing when pasting MS Word text’ is closed to new replies.