Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find/Replace clipboard contents

    I can't figure out how to find or replace the clipboard contents. I recall using ^c for this, but Word won't accept that now (after 1 or 2 upgrades). I want to search for non-printing characters that look like boxes on screen.
    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: Find/Replace clipboard contents

    Hi Randy:

    You cannot search for clipboard contents, but you can use ^c in the Replace box. And it doesn't matter whether "Use Wildcards" is on or off.

    In addition, here is some information on Finding & Replacing symobols which might help. I've copied & collected it from somewhere, but can't recall where.

    Find/Replace: Symbols
    Once you know its ASCII code, you can search for any character or symbol by prefixing the code (in base 10) with a caret. For example, you can use Word's search and replace dialogue to search for a tilde by entering ^126
    Finding the ASCII Code
    To find out the ASCII code of a particular symbol:

    Select the symbol in a Word document,
    Switch to the VBA editor with Alt F11
    Open the VBA Immediate Window with Ctrl G
    Enter the following line: ?asc(selection)

    The ASCII value of the symbol will be printed out in the Immediate Window.
    Finding the ANSI or Unicode
    You can also search for symbols by their ANSI or Unicode character numbers.

    Whereas the plain ascii search pattern is ^nnn (eg ^126), you can search by ANSI number with ^0nnn or by Unicode number with ^unnnn

    If you track down and select the symbol in the Insert Symbol dialogue, and then click the Shortcut Key button, you should find the symbol's number to the bottom left, in the Description box.
    Macro to Find ASCII Code: WordBasic
    Public Sub DisplayCharacterCode()
    'Name: DisplayCharacterCode
    'Descriptionisplays the ascii character code of the character
    WordBasic.PrintStatusBar str(Asc(WordBasic.[Selection$]()))
    WordBasic.CharRight
    End Sub
    Macro to Find ASCII Code: VBA[Done]
    Public Sub ASCIICharacterCode()
    Application.StatusBar = "Character code: " & Asc(selection)
    End Sub
    Find/Replace: Symbols
    You can Find Unicode characters if you know their code number, by keying ^u followed by the code number in the Find what: box. The problem is finding out the Unicode value to enter. One way is to find the symbol in the Insert Symbol box & then click the shortcut key button. The unicode number will be displayed. The Character Map does not necessarily give the correct info.

    Hope this helps.

  3. #3
    BAM
    Guest

    Re: Find/Replace clipboard contents

    Hi Randy,

    What non-printing character are you after?

    The only boxes I can think of are for most of the formatting options the Format/Paragraph and Line and Page Breaks tab. (they display in the left margin)

    If you are searching for these then you would search for Formatting instead of the character itself.

    For other nonprinting characters, use the "Special" menu.

    If you don't know which nonprinting character you are looking for, take a look at this article:
    <A target="_blank" HREF=http://www.mvps.org/word/FAQs/Formatting/NonPrintChars.htm>http://www.mvps.org/word/FAQs/Format...PrintChars.htm</A>
    ~~~~~~~~~~~~
    Cheers!

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find/Replace clipboard contents

    >I can't figure out how to find or replace the clipboard contents.

    Do you have VBA code to manipulate the clipboard? If not I do. Let me know and I'll post it in the VB/VBA forum.

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

    Re: Find/Replace clipboard contents

    Try pasting the clipboard into the find box instead. Position the cursor in the find box and press Ctrl-V. Now search on that.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

Posting Permissions

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