FIND square bracket

  • Thread starter Thread starter CHRISTER
  • Start date Start date
C

CHRISTER

Hi,

WORD 2000 SP3

I have received an very old document and I try to find
[ ] square bracket, but Word can't find any.

If I copy the documents [ ]square brackets in the find box
the square bracket is replaced by strange symbols, but
word cant still find any

Is there anything I can do to get Word find these
[ ] square brackets

Thanks for your help
Christer
 
If I understand you right you can't find the brackets? They are on the keyboard next to the "p"
 
A square bracket is a reserved character for *wildcard* searches so if you
want to find it in a wildcard search you should use an escape character eg
\[ \]
or
\^91 \^93

with non-wildcard searches the characters should be found OK.

The following macro will report the ansi value for a selected character,
which may help track down oddities:

Sub ANSIValue()
S1$ = "Because the selected text contains"
S2$ = " characters, not all of the ANSI values will be displayed."
S3$ = "ANSI Value ("
S4$ = " characters in selection)"
S5$ = " character in selection)"
S6$ = "Text must be selected before this macro is run."
S7$ = "ANSI Value"
Dim strSel, strNums, LastFourChar As String
Dim iPos As Integer
strSel = Selection.Text
If Len(strSel) > 0 Then
For i = 1 To Len(strSel)
strNums = strNums + Str(Asc(Mid(strSel, i)))
Next i
strNums = LTrim(strNums)
If Len(strNums) > 255 Then
LastFourChar = Mid(strNums, 252, 4)
strNums = Left(strNums, 251) + Left(LastFourChar, _
4 - InStr(" ", LastFourChar))
MsgBox S1$ + Str(Len(strSel)) + S2$
End If
If Len(strSel) = 1 Then S4$ = S5$
MsgBox strNums, 0, S3$ + LTrim(Str(Len(strSel))) + S4$
Else
MsgBox S6$, 0, S7$
End If
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
Hi Graham,

Thanks for your help

//Christer
-----Original Message-----
A square bracket is a reserved character for *wildcard* searches so if you
want to find it in a wildcard search you should use an escape character eg
\[ \]
or
\^91 \^93

with non-wildcard searches the characters should be found OK.

The following macro will report the ansi value for a selected character,
which may help track down oddities:

Sub ANSIValue()
S1$ = "Because the selected text contains"
S2$ = " characters, not all of the ANSI values will be displayed."
S3$ = "ANSI Value ("
S4$ = " characters in selection)"
S5$ = " character in selection)"
S6$ = "Text must be selected before this macro is run."
S7$ = "ANSI Value"
Dim strSel, strNums, LastFourChar As String
Dim iPos As Integer
strSel = Selection.Text
If Len(strSel) > 0 Then
For i = 1 To Len(strSel)
strNums = strNums + Str(Asc(Mid(strSel, i)))
Next i
strNums = LTrim(strNums)
If Len(strNums) > 255 Then
LastFourChar = Mid(strNums, 252, 4)
strNums = Left(strNums, 251) + Left(LastFourChar, _
4 - InStr(" ", LastFourChar))
MsgBox S1$ + Str(Len(strSel)) + S2$
End If
If Len(strSel) = 1 Then S4$ = S5$
MsgBox strNums, 0, S3$ + LTrim(Str(Len(strSel))) + S4$
Else
MsgBox S6$, 0, S7$
End If
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Hi,

WORD 2000 SP3

I have received an very old document and I try to find
[ ] square bracket, but Word can't find any.

If I copy the documents [ ]square brackets in the find box
the square bracket is replaced by strange symbols, but
word cant still find any

Is there anything I can do to get Word find these
[ ] square brackets

Thanks for your help
Christer


.
 
Hi Christer,

Once you know the code, you can search for the character by using ^u### in
"Find what", where ### is the code.

The square bracket [ might be from some decorative font. In this case, you
need to add 61440 to the code (91) of the square bracket.

Try
Find what: ^u61531

(BTW, change Asc to AscW in Graham's macro. Word above Word95 uses Unicode,
not ANSI)

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top