Results 1 to 15 of 15
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Replace with same value and something else (2000/2002)

    Is it possible to have Word search for postal codes by recognizing the pattern, then replace it by the same postal codes but a paragraph marker or a manual line break after the code?

  2. #2
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Yes. Put ^& in the "replace with" box and it tells Word to put the found value back in. You could then following with the code for manual line break or paragraph mark.<UL><LI>manual line break would be ^&^l
    <LI>new paragraph would be ^&^p[/list]HTH
    Karen

  3. #3
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    John,

    Using KB and Andrew's replies, I came up with this:

    Replace: ([A-Z][0-9][A-Z] [0-9][A-Z][0-9])
    With:^&^p

    That took a Canadian Postal Code, with a space in it, and replaced it with the same postal code and a paragraph mark in Word 2000.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Andrew,

    I just tried using ^p with Use Wildcards checked and it worked just fine for me in W2K.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

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

    Re: Replace with same value and something else (2000/2002)

    The ^p will always work in the Replace box & works in the Find box without wildcards. With wildcards, you have to use ^13 (or ^013, but why type an extra zero) in the Find box. Of course, I didn't test this in Canada. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  6. #6
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    It works in Word2002 as well, but is not available on the Special dialog. If one doesn't wish to use wild cards they can also do search without using ^# for any digit or ^$ for any letter -- so for the Canadian code one could search ^#^$^# ^#^$^# and find them as well.
    Karen

  7. #7
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Hi, Andrew.

    Since Word sees ^013 as a character and not a paragraph mark, using Normal view it appears that there are "missing" styles. Of course, they aren't really missing. Just something others should be aware of.
    Attached Images Attached Images
    Karen

  8. #8
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    I just did, and as usual, you're right Phil <img src=/S/bow.gif border=0 alt=bow width=15 height=15>
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  9. #9
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Actually Karen that would be ^$^#^$ ^#^$^#. Letter Number Letter Number Letter Number <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  10. #10
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    <img src=/S/blush.gif border=0 alt=blush width=15 height=15> Er, right... um, I was just testing you, Bryan. You passed with flying colors <img src=/S/fanfare.gif border=0 alt=fanfare width=31 height=23>.
    Karen

  11. #11
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Replace with same value and something else (2000/2002)

    John

    You will have to help me out on what a Candian postal code pattern is.

    Here in the land of Oz we have four arabic numerals so I would search with wildcards on for "([0-9]{4})" and replace it with "1^013". The ^013 is a return and is functionally similar to ^p which doesn't work when wildcards is turned on.

    Find the page in the help file that is titled something like "Fine tune a search using wildcards" for other possibilities.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  12. #12
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Thank you for your kind reply.

  13. #13
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Thanks for your valuable input.

  14. #14
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Thanks for helping me out.

  15. #15
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace with same value and something else (2000/2002)

    Thanks for everything, Phil.

Posting Permissions

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