Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Mar 2002
    Location
    Sheffield, South Yorkshire, England
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Macro usind Selection.Find with odd characters (Word 2000 SP3)

    I have been building a macro to carry out changes in a series of long documents.
    It uses Selection.Find to select the relevant characters before passing to Case to decide action.

    The bright spark who originated the document occasionally used ' and " like characters coded 8217 and 8221 in place of spaces (codes as identified by Lil'WOPR). They were invisible in the font origionally used but not in the font I plan to use. Besides they are messing up my macro as it identifies them as characters I need to deal with. How can I pursuade the Macro to search for these either in a specific Selection.Find or in my Case?

    If I cut and paste them in they turn into characters 39 and 34.

    Grrr

    Hopefully

    Frustrated John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro usind Selection.Find with odd characters (Word 2000 SP3)

    Something like

    With Selection.Find
    .Text = ChrW(8217)
    .Execute
    End With

    ChrW is the version of Chr to use for Unicode characters.

  3. #3
    Star Lounger
    Join Date
    Mar 2002
    Location
    Sheffield, South Yorkshire, England
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Macro usind Selection.Find with odd characters (Word 2000 SP3)

    That is brilliant.

    I was not aware of the code to use with unicode. It should solve my problems.

    Thanks very much

    John

  4. #4
    Star Lounger
    Join Date
    Mar 2002
    Location
    Sheffield, South Yorkshire, England
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Macro usind Selection.Find with odd characters (Word 2000 SP3)

    Just tried it and it works perfectly just as you knew it would!!

    Thanks again

    John

Posting Permissions

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