Consulting

Results 1 to 4 of 4

Thread: Find and replace words

  1. #1
    VBAX Regular
    Joined
    Jan 2019
    Posts
    9
    Location

    Find and replace words

    I would like to make a macro that find a word in my document and then replace it with something else that the client would write on the spot. I don't know if i'm understood so ill try to make an example. In my document there is lets say a place where we have to put a company name but this company is never the same. So the macro would find lets sayCOMPANYNAMETOADDand then maybe open a box or something where I could just write the company name like BMHinc" and it would be replaced. Is it possible to do that or something like that?

    Thank you

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    So what's wrong with using Find/Replace?
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    VBAX Regular
    Joined
    Jan 2019
    Posts
    9
    Location
    Well if people have to do find/replace they'll have to know what has to be replace (in this case COMPANYNAMETOADD) but that's less userfreindly as just like a box that tells you what like "Write your company name here". I don't know if it's possible, maybe not but i still ask in case. Most of the time people that will get the document made by my macros they are not the best at using a computer let's say.

  4. #4
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    You could, of course, use bookmarks instead of cryptic text, then all the user need do is press F5>bookmark and select the bookmark to go to for typing. A userform - which is what would be required otherwise - would ordinarily take the bookmark approach, though one might output to content controls instead. See, for example, the discussion at: http://www.msofficeforums.com/word-v...t-written.html
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Tags for this Thread

Posting Permissions

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