#1   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default find/replace

The unknown character is a Group Separator (ASCII 29) and to deal with it
you must use

ActiveDocument.Range.Text = Replace(ActiveDocument.Range.Text, Chr(29),
Chr(9))

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Stephen Larivee" wrote in message
...
Win XP, Word 2003

I exported a field in FileMaker Pro. It is a repeating field with two
dates in one field. I thought I could import the field into Word and find
the marker that separates one date from the next and do a Replace All and
put a Tab between the two dates and then put the dates into two different
fields, the way they belong. I have the field in Word and there is a
small rectangle between the dates. So far nothing I have used as a Find
has "found" it, except for White Space (^w), but when I do a find ^w and
replace ^t, Word replaces thousands of the occurences but the demon white
rectanges remain. I even tried copying and pasting the rectange into the
Find box but that is not working.

I have a posting on a FileMaker Pro board to see if someone can show me
how to separate the dates from with FileMaker, but it seems I should be
able to do it from within Word.

Does anyone have a suggestion???


  #2   Report Post  
Posted to microsoft.public.word.newusers
Stephen Larivee[_3_] Stephen Larivee[_3_] is offline
external usenet poster
 
Posts: 2
Default find/replace

Thank you for your help and the file you worked on. The finished file is
just what I was trying to do. I think my only question would be, How did
you know that the separating mark was ASCII 29?


"Doug Robbins - Word MVP" wrote in message
...

The unknown character is a Group Separator (ASCII 29) and to deal with it
you must use

ActiveDocument.Range.Text = Replace(ActiveDocument.Range.Text, Chr(29),
Chr(9))

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Stephen Larivee" wrote in message
...
Win XP, Word 2003

I exported a field in FileMaker Pro. It is a repeating field with two
dates in one field. I thought I could import the field into Word and
find the marker that separates one date from the next and do a Replace
All and put a Tab between the two dates and then put the dates into two
different fields, the way they belong. I have the field in Word and
there is a small rectangle between the dates. So far nothing I have used
as a Find has "found" it, except for White Space (^w), but when I do a
find ^w and replace ^t, Word replaces thousands of the occurences but the
demon white rectanges remain. I even tried copying and pasting the
rectange into the Find box but that is not working.

I have a posting on a FileMaker Pro board to see if someone can show me
how to separate the dates from with FileMaker, but it seems I should be
able to do it from within Word.

Does anyone have a suggestion???


  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default find/replace

The following macro will give you the value of a selected character

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

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Stephen Larivee" wrote in message
...
Thank you for your help and the file you worked on. The finished file is
just what I was trying to do. I think my only question would be, How did
you know that the separating mark was ASCII 29?


"Doug Robbins - Word MVP" wrote in message
...

The unknown character is a Group Separator (ASCII 29) and to deal with it
you must use

ActiveDocument.Range.Text = Replace(ActiveDocument.Range.Text, Chr(29),
Chr(9))

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Stephen Larivee" wrote in message
...
Win XP, Word 2003

I exported a field in FileMaker Pro. It is a repeating field with two
dates in one field. I thought I could import the field into Word and
find the marker that separates one date from the next and do a Replace
All and put a Tab between the two dates and then put the dates into two
different fields, the way they belong. I have the field in Word and
there is a small rectangle between the dates. So far nothing I have used
as a Find has "found" it, except for White Space (^w), but when I do a
find ^w and replace ^t, Word replaces thousands of the occurences but
the demon white rectanges remain. I even tried copying and pasting the
rectange into the Find box but that is not working.

I have a posting on a FileMaker Pro board to see if someone can show me
how to separate the dates from with FileMaker, but it seems I should be
able to do it from within Word.

Does anyone have a suggestion???




  #4   Report Post  
Posted to microsoft.public.word.newusers
Stephen Larivee[_3_] Stephen Larivee[_3_] is offline
external usenet poster
 
Posts: 2
Default find/replace

Thank you!!

"Graham Mayor" wrote in message
...
The following macro will give you the value of a selected character

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

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Stephen Larivee" wrote in message
...
Thank you for your help and the file you worked on. The finished file is
just what I was trying to do. I think my only question would be, How did
you know that the separating mark was ASCII 29?


"Doug Robbins - Word MVP" wrote in message
...

The unknown character is a Group Separator (ASCII 29) and to deal with
it you must use

ActiveDocument.Range.Text = Replace(ActiveDocument.Range.Text, Chr(29),
Chr(9))

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Stephen Larivee" wrote in message
...
Win XP, Word 2003

I exported a field in FileMaker Pro. It is a repeating field with two
dates in one field. I thought I could import the field into Word and
find the marker that separates one date from the next and do a Replace
All and put a Tab between the two dates and then put the dates into two
different fields, the way they belong. I have the field in Word and
there is a small rectangle between the dates. So far nothing I have
used as a Find has "found" it, except for White Space (^w), but when I
do a find ^w and replace ^t, Word replaces thousands of the occurences
but the demon white rectanges remain. I even tried copying and pasting
the rectange into the Find box but that is not working.

I have a posting on a FileMaker Pro board to see if someone can show me
how to separate the dates from with FileMaker, but it seems I should be
able to do it from within Word.

Does anyone have a suggestion???



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find+Replace Dialog Box, Replace with Format problem Kathy Microsoft Word Help 3 February 1st 08 04:26 AM
Find multiple characters in one find using MSword find/replace Cliff Microsoft Word Help 2 October 29th 06 07:48 PM
Trying to replace words with fields using Find/Replace mbleyle Microsoft Word Help 2 March 29th 06 11:35 PM
Using find and replace or macros to replace page ranges JeremyC Microsoft Word Help 7 February 13th 06 09:20 PM
Find/ Replace is auto-capping the words I want to replace with Graham Mayor Microsoft Word Help 8 January 27th 06 01:39 AM


All times are GMT +1. The time now is 08:16 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"