+ Reply to Thread
Results 1 to 4 of 4

Open word then find replace text

  1. #1
    Shawn G.
    Guest

    Open word then find replace text

    I need to open a word Document then find certain text and replace it from
    excel.
    example:
    Open WordDocTest.doc
    Find text "<project#>"
    Replace text with "Test234"

    I can open the document but cannot get it to search.
    Any ideas

    Thank You!


  2. #2
    Steve Yandl
    Guest

    Re: Open word then find replace text

    Shawn,

    Here is an excellent example of what you want.
    http://word.mvps.org/FAQs/InterDev/C...WordFromXL.htm

    Steve Yandl


    "Shawn G." <[email protected]> wrote in message
    news:[email protected]...
    >I need to open a word Document then find certain text and replace it from
    > excel.
    > example:
    > Open WordDocTest.doc
    > Find text "<project#>"
    > Replace text with "Test234"
    >
    > I can open the document but cannot get it to search.
    > Any ideas
    >
    > Thank You!
    >




  3. #3
    Ed
    Guest

    Re: Open word then find replace text

    You might be better off setting an object to the Word application, then
    setting an object to the document opened. Then you can use the Word
    application Find object on the doc object. Set your Excel cell text to a
    variable, and use that variable in the Replace. Make sure you set a
    reference to the Word library.

    Ed

    "Shawn G." <[email protected]> wrote in message
    news:[email protected]...
    > I need to open a word Document then find certain text and replace it from
    > excel.
    > example:
    > Open WordDocTest.doc
    > Find text "<project#>"
    > Replace text with "Test234"
    >
    > I can open the document but cannot get it to search.
    > Any ideas
    >
    > Thank You!
    >




  4. #4
    Shawn G.
    Guest

    Re: Open word then find replace text

    I have the word Doc set as an object, and I can get it open. The problem is
    finding the text. I cannot figure out how to get the .FIND to work.
    Any ideas?

    Thanks,

    "Ed" wrote:

    > You might be better off setting an object to the Word application, then
    > setting an object to the document opened. Then you can use the Word
    > application Find object on the doc object. Set your Excel cell text to a
    > variable, and use that variable in the Replace. Make sure you set a
    > reference to the Word library.
    >
    > Ed
    >
    > "Shawn G." <[email protected]> wrote in message
    > news:[email protected]...
    > > I need to open a word Document then find certain text and replace it from
    > > excel.
    > > example:
    > > Open WordDocTest.doc
    > > Find text "<project#>"
    > > Replace text with "Test234"
    > >
    > > I can open the document but cannot get it to search.
    > > Any ideas
    > >
    > > Thank You!
    > >

    >
    >
    >


+ 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