Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting Between Excel and Word
I am having a hard time getting formatted text back and forth between excel
and word. I can take the contents of an excel cell and (through the clipboard) get it into word in the RichText Format (bold, font size..). What I want to do is to be able to edit the text using word and then when I'm done, I click Yes/No on a message box that is displayed from Excel. From there, Excel will copy back (through the clipboard?) the changes that were made in word, while keeping the RichText format (all styles [bold, underline..], font faces, font sizes..). I can get the text back into the cell, but the formatting is not kept.. only the plain text is. The other problem is that anywhere there was a carriage return (enter key) or tab (tab key) in word, it is copied back as a special symbol / character into excel.. can I change the carriage returns into excel carriage returns and the tabs into 5 spaces? I can list the code that I am using to accomplish this if needed. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting Between Excel and Word
Nevermind. I played around with the code while I waited for an answer and
came up with my own solution. It deals with accessing each character of the text in word and creating the same formatting for the same character copied to excel. I have fairly nice commented code for those who wish to see it. "Alex" wrote: I am having a hard time getting formatted text back and forth between excel and word. I can take the contents of an excel cell and (through the clipboard) get it into word in the RichText Format (bold, font size..). What I want to do is to be able to edit the text using word and then when I'm done, I click Yes/No on a message box that is displayed from Excel. From there, Excel will copy back (through the clipboard?) the changes that were made in word, while keeping the RichText format (all styles [bold, underline..], font faces, font sizes..). I can get the text back into the cell, but the formatting is not kept.. only the plain text is. The other problem is that anywhere there was a carriage return (enter key) or tab (tab key) in word, it is copied back as a special symbol / character into excel.. can I change the carriage returns into excel carriage returns and the tabs into 5 spaces? I can list the code that I am using to accomplish this if needed. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasting excel into word | Excel Discussion (Misc queries) | |||
Pasting from Word into Excel | Excel Discussion (Misc queries) | |||
Pasting Excel charts into Word | Charts and Charting in Excel | |||
copying from word and pasting into excel | Excel Programming | |||
Pasting a Word Table into Excel | Excel Discussion (Misc queries) |