• Find and Replace Fields (Word 2002)

    Author
    Topic
    #377871

    I can find all fields in a document, but cannot replace them with another field, even when I type the field code by hand.
    Any suggestions, and is this even possible? My objective is to find and replace an old symbol which is no longer supported with a field.
    Thanks in advance.
    kw

    Viewing 2 reply threads
    Author
    Replies
    • #623681

      I don’t think there is a way using ‘replace’.

      I assume that you have a lot of these (or you wouldn’t be asking). It CAN be done by recording a macro

      Start by searching for your field to replace – then set your cursor back to the beginning of file.

      Then record a Macro, assigned to a key. Record the sequence

      ALT+CTRL+Y [ which finds the next occurence of your target
      Insert > Field > ….new field [ which replaces it

      and stop recording

      Then press the assigned key to do it again

    • #623698

      Hi kw:
      You can’t do it directly, but you can do it. Here’s how to do it using Find/Replace. Let’s assume you want to replace a {PAGE} field with a {DATE} field.

      1. Press Alt+F9 to show field codes.
      2. Create a new character style that’s not used elsewhere in your document. Let’s call it NEW.
      Wildcards is not checked

      find replace comment
      ^19 PAGE ^&
      Format= Style/NEW
      ^19 finds the opening field brace
      & PAGE limits it to page fields;
      ^& replaces what was found with
      itself, except the character style is
      now NEW
      PAGE
      Format=NEW
      DATE
      Format: You can either
      leave the formatting as is, or
      revert it back to the original style
      This finds only the PAGE text that has the character format of NEW;
      i.e. only those within a field.

      Cheers,

      • #623720

        Phil,

        Very nice, I’ve not come across this one before. Is it original or is it general knowledge?

        StuartR

        • #623746

          Hi Stuart:
          I actually thought this one up myself. Hard to believe. laugh But the technique (of using intermediate steps) is sort of general knowledge (I think)…I first saw it as the solution to getting rid of double paragraph marks in text pasted from emails & other text files.
          Cheers,

    • #623958

      I would do this by using the clipboard as the replacement element. To do this:
      Create the element you want to use.
      Select it and cut (or copy) it
      Now open the find and replace dialog and use ^c in the replace with box

    Viewing 2 reply threads
    Reply To: Find and Replace Fields (Word 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: