+ Reply to Thread
Results 1 to 2 of 2

copy excel comment to word document

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    sweden
    MS-Off Ver
    Excel 2007
    Posts
    1

    copy excel comment to word document

    Hi,

    I'm kind of a beginner in VBA and I'm struggling with a, for me, really complex problem.

    I want to copy a comment from a cell in excel into a word dokument.

    Here is more exactly what I want to do:

    I have a word document with a lot of text and an excel document with comments attached to cells in a column.

    Lets say that the excel document looks like this:

    Column A: A1: Dog - comment "wof wof"
    A2: Cat - comment "mjau"
    A3: Horse - comment "iiha"
    ... and so on

    the word dokument looks like this:

    text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text..

    Dog

    text text text text text text text text text text text text text text text text text text text..

    Cat
    .... and so on.

    What I whant the macro to do is:
    • If the word Dog appears in the word document.
    • Find the cell that contains the text Dog in column A in excel.
    • Copy the comment "wof wof" attached to the cell whith Dog in it.
    • Paste the comment "wof wof" after the word Dog in excel.

    Then do the same for Cat and Horse and so on.

    Would be very thankful if anyone knows how to do this in VBA.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: copy excel comment to word document

    I think you are looking for Search/Replace Word Pairs in Microsoft Word only. I believe there are multiple ways to do this. Using Search and Replace multiple times is one. Using the Spell Checking Dictionary is another. I believe you can also do this with an Excel List and Mail merge into Word.

+ 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