+ Reply to Thread
Results 1 to 2 of 2

Pasting Between Excel and Word

  1. #1
    Alex
    Guest

    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. #2
    Alex
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1