Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi

    I have a document in Word 2007 which contains a lot of hyperlinks. Every hyperlink is followed by the text 'see page nnn' where n is a cross reference to a page number (page numbers are between 1 and 250).

    I've been trying to fathom how I can use wildcards in Find/Replace to change instances of 'see page nnn' to a specified character style, but I just can't get to the bottom of how to express the page numbers as wildcards.

    Can anybody help please?

    Thanks in advance

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by lonewriter View Post
    I've been trying to fathom how I can use wildcards in Find/Replace to change instances of 'see page nnn' to a specified character style, but I just can't get to the bottom of how to express the page numbers as wildcards.
    In the Find what pattern, there are many ways to refer to 3 sequential digits. For example:

    Code:
    (see page [0-9]{3})
    In the Replace with pattern, you can refer to the match (because it is in parentheses) as:

    Code:
    \1
    (That's a 1 for first match, not a lower case L.)

    Does that help?

    I'm assuming the number is not a Word cross-reference field: field codes could be damaged (wiped out, probably) by this kind of replace.

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Hi Lonewriter,

    The wildcard find expression for this is 'see page [0-9]{1,3}'. For the replace expression you can use '^&' and set the replacement style to the required character format.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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