Cutting and pasting from Excel into Word

I have an Excel table which includes text generated by a formula including the CHAR(10) to generate new lines.
When the table is cut and pasted into Word, I want each of the new lines to be a new paragraph within the cell. (i.e what you would get from pressing <ENTER> in a Word table rather than <SHIFT><ENTER>).
However Excel enters them as new lines not new paragraphs.
In other words, I get this:

When I want this:

I have tried CHAR(10)&CHAR(13) in the formula generating the text, but this does not work either, with Word treating this as two line breaks rather than a paragraph break,

How do I get paragraph breaks when cutting and pasting from an Excel table into a Word table?

|

After pasting into Word, use the Replace dialog (Ctrl+H) to replace ^l (that is a lower-case L) with ^p

^l is the code for a line break, and ^p for a paragraph break.

---
Best wishes, HansV
https://www.eileenslounge.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I am developing the Excel file and the process needs to be automated. I do not have access to the Word document and the data will in fact need to be pasted into multiple Word documents on multiple occasions. I therefore need an answer which is wholly Excel based. Manually doing things in Word won't cut the ice.

If I cut and pastes text from Excel into Word as plain text, it gets pasted with vbCrLf type paragraph breaks. It's just when I cut and past as a table, it uses vbCr (chr(10)) instead. So there should be some way of doing it.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

How do you manage to paste into the Word document if you do not have access to it?

---
Best wishes, HansV
https://www.eileenslounge.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I don't. As I said, I 'm developing an Excel program. The Excel program can go as far as creating the table and copying it to the clipboard. The user will then paste the tables from the clipboard into the various Word documents they are creating. I will never see their Word documents.

Think of the authors who developed the snipping tool in Windows. That program allows you to select a graphic and then save it to the clipboard. You can then paste that graphic into a Word document. The authors of the snipping tool didn't need to have access to your Word document. I am in the same position as the author of the snipping tool. I generate what goes onto the clipboard. That's it.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

You may have to do the following:

  • Copy the Excel data to the clipboard.

  • Start Word and create a blank document (using Automation).

  • Paste the data into the document.

  • Replace ^l with ^p.

  • Copy the Word table to the clipboard.

  • The user can now paste correctly into their own Word document.

---
Best wishes, HansV
https://www.eileenslounge.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Inter-operability between Office 365 seems to be a bit poor here: I was hoping for something simple like a series of CHAR() codes that designate a paragraph break within a table.

But if there isn't anything better, your proposed kludge is certainly a work-around although a heck of a lot of coding for something I thought might be simple.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 4, 2024 Views 21 Applies to: