Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Combining a form with search & replace (Word 2002)

    Long time no post! So glad this forum is here!
    Here's my dilemma: I've been automating LONG documents so users with basic skills can fill in the blanks. I.E., I've made a form. But I'd also like to have a search and replace function, because they have to fill in the same information over and over again. But I can't see how to combine the fields of a form with a searchable text string linked to that field. Example: on a protected document, search for *1 and replace with your last name, within the open field, so the rest of the document cannot be edited! <img src=/S/artist.gif border=0 alt=artist width=34 height=29>
    Thanks,

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Hi Naomi:
    Find/Replace is unavailable in a protected form. You could develop a macro that would unprotect the document, do a search & replace, & then reprotect the document without losing everything in the formfields. However, wouldn't it be simpler to use REF fields. If you have a formfield, set the properties to "Calculate on exit" so that the REF fields will be updated. Each formfield has a bookmark name (starting with Text1, by default), which you can rename. Then use the syntax:

    {REF bookmarkname}

    for each place you want to repeat the information. The brackets are inserted using Ctrl+F9, not typed.
    Hope this helps,

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Phil,
    I'm not very familiar with fields. I know about "calculate on exit" and I found where the bookmarks were named, and was able to rename one. But I'm lost after that. Where do I use the syntax, how do I do that, and would I have to know the user's individual information to set this up? I won't be handholding, once it leaves my pc the form is on its own. This has to be user easy. Unless I can send along directions that explains how they would do it.

    Thanks!

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Hi Naomi:
    Here's how I would do it. I would set up a template that contained the boilerplate information, the layout, the formfields, & REF fields. Then I would protect it. Users can then create a new protected form from that template. Since you know about "calculate on exit" & where to find (& rename, if you want) the bookmark names for each formfield, you can do this. You can modify one of the existing forms & save it as a template. To do that:
    1. Unprotect the form.
    2. Let's say there is a formfield with a bookmark name of "username", where the user either types in their name or selects it from a dropdown formfield. Navigate to the spot in the document where you want the username to be repeated automatically.
    3. With the cursor at that spot, press Ctrl+F9. Curly brackets will appear & the cursor will be inside. I find it helpful to have Tools/Options/View/Field Shading set to "always".
    4. Inside the curly brackets, type <font color=red>REF username</font color=red>.
    5. For every place that you want information that's in a formfield to be repeated, go through steps 2 through 4. e.g. if the user types an address in another formfield & it's bookmark name is <font color=red>address</font color=red>, create the field braces (curly brackets) & type <font color=red>REF address</font color=red> inside.
    6. Save the form as a template & protect it for forms.

    If you have any further questions, please post back.

  5. #5
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Hi Phil,
    that all seems awfully complicated for a potentially non-computer person. Excel has exactly what I need (although putting everything into excel won't work). You type in your information in one document and it automatically fills in the links in another document. Does word have this?

    Thanks for your help,

  6. #6
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    I take it back, upon rereading your post maybe that's exactly what you've figured out - how to make an Excel type link. I'll give it a shot.

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Hi Naomi:
    See the attached example form.
    Cheers,
    Attached Files Attached Files

  8. #8
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Dear Phil,
    tried it - thanks so much for the example - but I'm missing something.
    I have the form fields already in place. How do I bookmark it? select the field, do insert bookmark? Don't think that's right. Then (having done that) typing in { REF lastname} actually includes the form field as an EXTRA blank area the the left of the rightmost bracket. Don't think that's right! Then I tried to repeat that step, and that didn't work! Please get me back on track. Thanks! <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15>

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Hi Naomi:
    If you unprotect the document & double click on a form field, you'll see that it already has a bookmark name. You can keep it, or change it to something more descriptive than Text1, Text2, etc., such as LastName, etc. Also, if you go to Insert/Bookmark, you will see all the bookmarks that are in your document (except hidden ones, unless you check the box for that).

    Then, in the REF field, you must use whatever bookmark name that you have for the form field.
    Cheers,

  10. #10
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Dear Phil,

    this isn't working for me! I renamed bookmarks as you said. Then I did clicked on the form field, control F9, saw the brackets, and typed in {REF lastname}. However, as I typed, the rightmost bracket pushed over to accomodate the form field that was already there, so it had this appearance:
    {REF lastname { FORMTEXT}}. Then when I locked the document and tabbed, it skipped right past that field (in fact I couldn't even see the shading). Are we miscommunicating on the term "form field?"
    thanks,
    Naomi

  11. #11
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Combining a form with search & replace (Word 2

    Naomi,

    The REF field will repeat information that is included elsewhere in the document in a bookmark
    The FORMTEXT field will allow the user to enter information
    It doesn't really make sense to put one of these inside the other
    Try deleting the FORMTEXT field altogether and using just the REF field. I think this will do what you want.

    StuartR

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Hi Naomi:
    As Stuart said, REF fields are not where you type data. They repeat data that is already typed. If you look at the example that I sent, unlock it & look at the field codes by pressing Alt+F9. See the attached screenshot.
    Attached Images Attached Images

  13. #13
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    YAAAAYY!!! I GOT IT!!! THIS IS IT! THANK YOU! IT WORKS IT WORKS. WOW, IT'S GREAT, THANK YOU FOR ALL THE POSTS! This is very cool! Now: is there any way to repeat.... well I guess I could make a macro for that REF field. I have a lot of the same ones and copy/paste didn't work!
    GRACIAS, GRASSY ASS, ALL THAT! <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

  14. #14
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Hi Naomi:
    You're welcome. I'm glad it worked for you. Copy & paste should work easily. If you select the REF field, with or without field codes showing, you can paste it into another part of your document as many times as you wish. You MUST unlock your form before you do this. If you select & update your fields (F9), you should see the results.

    Also, if you wanted to replace e.g. all instances of the word [i]Name[i/] with the field {REF Name}, you could use Find/Replace. You would first copy the {REF Name} field to the clipboard, then

    Find: Name
    Replace: ^c

    The ^c replaces what is found with the clipboard contents. You would repeat the above steps for each type of REF field (copying the correct one to the clipboard each time).
    Cheers,

  15. #15
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brooklyn, New York, USA
    Posts
    200
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Combining a form with search & replace (Word 2

    Phil,

    It worked for one session, but one of the bookmarks wouldn't "take" (couldn't see the name show up after doing the whole bookmark/ref field insertion - and when I revealed codes I noticed this on all the previously successful REF fields:
    { REF wifelastname * MERGEFORMAT }
    then THOSE names disappeared in normal view!

    do you know what's going on?

    thanks.

Page 1 of 2 12 LastLast

Posting Permissions

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