Hi,

I do not know if this is the right group to post this message.
I needed to search for the numbers between 75 and 99. I built 2 search
strings using wildcards (I am not using VBScript regular expressions). One
for numbers from 75 to 79, and the second for the numbers from 80 to 99. It
works fine. Anyway, I wonder if it is possible to build one search string
that would find numbers between 75 and 99 using wildcards.


Thank you very much.
Regards,
Robert

Re: How to build the search string to find numbers from 75 to 99? by Dave

Dave
Thu Apr 14 09:02:04 CDT 2005

Hi Robert,

You can iterate through the numbers and do it with the following:

Dim iNum As Integer
Dim iLoop As Integer

iNum = 75

With Selection
.HomeKey Unit:=wdStory
For iLoop = 1 To 100 - 75
With .Find
.Text = CStr(iNum)
.MatchWholeWord = True
With .Replacement
.ClearFormatting
.Font.Bold = True
End With
.Execute Replace:=wdReplaceAll
End With
iNum = iNum + 1
Next iLoop
End With

If you have your heart set on wildcards, then you can use something like the
following:

With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Text = "<[7][5-9]>"
.MatchWildcards = True
With .Replacement
.ClearFormatting
.Font.Bold = True
End With
.Execute Replace:=wdReplaceAll

.Text = "<[8-9][0-9]>"
.Execute Replace:=wdReplaceAll
End With
End With

HTH,
Dave


"Robix" <address923@hotmail.com> wrote in message
news:%238o3dJPQFHA.1172@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I do not know if this is the right group to post this message.
> I needed to search for the numbers between 75 and 99. I built 2 search
> strings using wildcards (I am not using VBScript regular expressions). One
> for numbers from 75 to 79, and the second for the numbers from 80 to 99.
It
> works fine. Anyway, I wonder if it is possible to build one search string
> that would find numbers between 75 and 99 using wildcards.
>
>
> Thank you very much.
> Regards,
> Robert
>
>



Re: How to build the search string to find numbers from 75 to 99? by Robix

Robix
Thu Apr 14 09:49:56 CDT 2005

Hi Dave,

Thank you for your code.
I created exactly the same search strings using wildcards (one for 75 to 79,
another one for 80 to 99). But I wonder if those two search strings can be
put together in just one search string covering numbers between 75 and 99. I
tried to use vertical bar | to create a condition, but it does not seem to
work with wildcards. Vertical bar seems to have no special meaning in
wildcards.

Can you advise on this?
Regards,
Robert

"Dave Lett" <dlett@NOsmconst.comSPAM.com> wrote in message
news:uHZssqPQFHA.3416@TK2MSFTNGP10.phx.gbl...
> Hi Robert,
>
> You can iterate through the numbers and do it with the following:
>
> Dim iNum As Integer
> Dim iLoop As Integer
>
> iNum = 75
>
> With Selection
> .HomeKey Unit:=wdStory
> For iLoop = 1 To 100 - 75
> With .Find
> .Text = CStr(iNum)
> .MatchWholeWord = True
> With .Replacement
> .ClearFormatting
> .Font.Bold = True
> End With
> .Execute Replace:=wdReplaceAll
> End With
> iNum = iNum + 1
> Next iLoop
> End With
>
> If you have your heart set on wildcards, then you can use something like
> the
> following:
>
> With Selection
> .HomeKey Unit:=wdStory
> With .Find
> .ClearFormatting
> .Text = "<[7][5-9]>"
> .MatchWildcards = True
> With .Replacement
> .ClearFormatting
> .Font.Bold = True
> End With
> .Execute Replace:=wdReplaceAll
>
> .Text = "<[8-9][0-9]>"
> .Execute Replace:=wdReplaceAll
> End With
> End With
>
> HTH,
> Dave
>
>
> "Robix" <address923@hotmail.com> wrote in message
> news:%238o3dJPQFHA.1172@TK2MSFTNGP12.phx.gbl...
>> Hi,
>>
>> I do not know if this is the right group to post this message.
>> I needed to search for the numbers between 75 and 99. I built 2 search
>> strings using wildcards (I am not using VBScript regular expressions).
>> One
>> for numbers from 75 to 79, and the second for the numbers from 80 to 99.
> It
>> works fine. Anyway, I wonder if it is possible to build one search string
>> that would find numbers between 75 and 99 using wildcards.
>>
>>
>> Thank you very much.
>> Regards,
>> Robert
>>
>>
>
>



Re: How to build the search string to find numbers from 75 to 99? by Klaus

Klaus
Thu Apr 14 11:59:41 CDT 2005

Hi Robin,

You're right: "or" (|) is missing from Word's wildcard repertoire.

You can tell Microsoft that you'd like this feature with a mail/post to =
MSWish:
http://register.microsoft.com/mswish/suggestion.asp
or post it as a "suggestion" on the web interface to these newsgroups:
http://www.microsoft.com/office/community/en-us/FlyoutOverview.mspx#13
(Passport needed; MS empoyees look at suggestions and reply to a [very] =
few).=20

Greetings,
Klaus




"Robix" <address923@hotmail.com> wrote:
> Hi Dave,
>=20
> Thank you for your code.
> I created exactly the same search strings using wildcards (one for 75 =
to 79,=20
> another one for 80 to 99). But I wonder if those two search strings =
can be=20
> put together in just one search string covering numbers between 75 and =
99. I=20
> tried to use vertical bar | to create a condition, but it does not =
seem to=20
> work with wildcards. Vertical bar seems to have no special meaning in=20
> wildcards.
>=20
> Can you advise on this?
> Regards,
> Robert
>=20
> "Dave Lett" <dlett@NOsmconst.comSPAM.com> wrote in message=20
> news:uHZssqPQFHA.3416@TK2MSFTNGP10.phx.gbl...
> > Hi Robert,
> >
> > You can iterate through the numbers and do it with the following:
> >
> > Dim iNum As Integer
> > Dim iLoop As Integer
> >
> > iNum =3D 75
> >
> > With Selection
> > .HomeKey Unit:=3DwdStory
> > For iLoop =3D 1 To 100 - 75
> > With .Find
> > .Text =3D CStr(iNum)
> > .MatchWholeWord =3D True
> > With .Replacement
> > .ClearFormatting
> > .Font.Bold =3D True
> > End With
> > .Execute Replace:=3DwdReplaceAll
> > End With
> > iNum =3D iNum + 1
> > Next iLoop
> > End With
> >
> > If you have your heart set on wildcards, then you can use something =
like=20
> > the
> > following:
> >
> > With Selection
> > .HomeKey Unit:=3DwdStory
> > With .Find
> > .ClearFormatting
> > .Text =3D "<[7][5-9]>"
> > .MatchWildcards =3D True
> > With .Replacement
> > .ClearFormatting
> > .Font.Bold =3D True
> > End With
> > .Execute Replace:=3DwdReplaceAll
> >
> > .Text =3D "<[8-9][0-9]>"
> > .Execute Replace:=3DwdReplaceAll
> > End With
> > End With
> >
> > HTH,
> > Dave
> >
> >
> > "Robix" <address923@hotmail.com> wrote in message
> > news:%238o3dJPQFHA.1172@TK2MSFTNGP12.phx.gbl...
> >> Hi,
> >>
> >> I do not know if this is the right group to post this message.
> >> I needed to search for the numbers between 75 and 99. I built 2 =
search
> >> strings using wildcards (I am not using VBScript regular =
expressions).=20
> >> One
> >> for numbers from 75 to 79, and the second for the numbers from 80 =
to 99.
> > It
> >> works fine. Anyway, I wonder if it is possible to build one search =
string
> >> that would find numbers between 75 and 99 using wildcards.
> >>
> >>
> >> Thank you very much.
> >> Regards,
> >> Robert
> >>
> >>
> >
> >=20
>=20
>

Re: How to build the search string to find numbers from 75 to 99? by Robix

Robix
Fri Apr 15 07:46:10 CDT 2005

Hi Klaus,

Thank you for the confirmation on vertical bar.
As for the posting it to MS, I will think about :) I'm sure I not the first
man who misses it.

Regards,
Robert

"Klaus Linke" <info@fotosatz-kaufmann.de> wrote in message
news:%23jugbNRQFHA.2680@TK2MSFTNGP09.phx.gbl...
Hi Robin,

You're right: "or" (|) is missing from Word's wildcard repertoire.

You can tell Microsoft that you'd like this feature with a mail/post to
MSWish:
http://register.microsoft.com/mswish/suggestion.asp
or post it as a "suggestion" on the web interface to these newsgroups:
http://www.microsoft.com/office/community/en-us/FlyoutOverview.mspx#13
(Passport needed; MS empoyees look at suggestions and reply to a [very]
few).

Greetings,
Klaus




"Robix" <address923@hotmail.com> wrote:
> Hi Dave,
>
> Thank you for your code.
> I created exactly the same search strings using wildcards (one for 75 to
> 79,
> another one for 80 to 99). But I wonder if those two search strings can be
> put together in just one search string covering numbers between 75 and 99.
> I
> tried to use vertical bar | to create a condition, but it does not seem to
> work with wildcards. Vertical bar seems to have no special meaning in
> wildcards.
>
> Can you advise on this?
> Regards,
> Robert
>
> "Dave Lett" <dlett@NOsmconst.comSPAM.com> wrote in message
> news:uHZssqPQFHA.3416@TK2MSFTNGP10.phx.gbl...
> > Hi Robert,
> >
> > You can iterate through the numbers and do it with the following:
> >
> > Dim iNum As Integer
> > Dim iLoop As Integer
> >
> > iNum = 75
> >
> > With Selection
> > .HomeKey Unit:=wdStory
> > For iLoop = 1 To 100 - 75
> > With .Find
> > .Text = CStr(iNum)
> > .MatchWholeWord = True
> > With .Replacement
> > .ClearFormatting
> > .Font.Bold = True
> > End With
> > .Execute Replace:=wdReplaceAll
> > End With
> > iNum = iNum + 1
> > Next iLoop
> > End With
> >
> > If you have your heart set on wildcards, then you can use something like
> > the
> > following:
> >
> > With Selection
> > .HomeKey Unit:=wdStory
> > With .Find
> > .ClearFormatting
> > .Text = "<[7][5-9]>"
> > .MatchWildcards = True
> > With .Replacement
> > .ClearFormatting
> > .Font.Bold = True
> > End With
> > .Execute Replace:=wdReplaceAll
> >
> > .Text = "<[8-9][0-9]>"
> > .Execute Replace:=wdReplaceAll
> > End With
> > End With
> >
> > HTH,
> > Dave
> >
> >
> > "Robix" <address923@hotmail.com> wrote in message
> > news:%238o3dJPQFHA.1172@TK2MSFTNGP12.phx.gbl...
> >> Hi,
> >>
> >> I do not know if this is the right group to post this message.
> >> I needed to search for the numbers between 75 and 99. I built 2 search
> >> strings using wildcards (I am not using VBScript regular expressions).
> >> One
> >> for numbers from 75 to 79, and the second for the numbers from 80 to
> >> 99.
> > It
> >> works fine. Anyway, I wonder if it is possible to build one search
> >> string
> >> that would find numbers between 75 and 99 using wildcards.
> >>
> >>
> >> Thank you very much.
> >> Regards,
> >> Robert
> >>
> >>
> >
> >
>
>



Re: How to build the search string to find numbers from 75 to 99? by Klaus

Klaus
Fri Apr 15 09:40:50 CDT 2005

Sure. In theory, the more people request a feature, the more likely the =
dev team is to pick that up...

Regards,
Klaus


"Robix" <address923@hotmail.com> schrieb im Newsbeitrag =
news:#87wwkbQFHA.3156@TK2MSFTNGP15.phx.gbl...
> Hi Klaus,
>=20
> Thank you for the confirmation on vertical bar.
> As for the posting it to MS, I will think about :) I'm sure I not the =
first=20
> man who misses it.
>=20
> Regards,
> Robert
>=20
> "Klaus Linke" <info@fotosatz-kaufmann.de> wrote in message=20
> news:%23jugbNRQFHA.2680@TK2MSFTNGP09.phx.gbl...
> Hi Robin,
>=20
> You're right: "or" (|) is missing from Word's wildcard repertoire.
>=20
> You can tell Microsoft that you'd like this feature with a mail/post =
to=20
> MSWish:
> http://register.microsoft.com/mswish/suggestion.asp
> or post it as a "suggestion" on the web interface to these newsgroups:
> http://www.microsoft.com/office/community/en-us/FlyoutOverview.mspx#13
> (Passport needed; MS empoyees look at suggestions and reply to a =
[very]=20
> few).
>=20
> Greetings,
> Klaus
>=20
>=20
>=20
>=20
> "Robix" <address923@hotmail.com> wrote:
> > Hi Dave,
> >
> > Thank you for your code.
> > I created exactly the same search strings using wildcards (one for =
75 to=20
> > 79,
> > another one for 80 to 99). But I wonder if those two search strings =
can be
> > put together in just one search string covering numbers between 75 =
and 99.=20
> > I
> > tried to use vertical bar | to create a condition, but it does not =
seem to
> > work with wildcards. Vertical bar seems to have no special meaning =
in
> > wildcards.
> >
> > Can you advise on this?
> > Regards,
> > Robert
> >
> > "Dave Lett" <dlett@NOsmconst.comSPAM.com> wrote in message
> > news:uHZssqPQFHA.3416@TK2MSFTNGP10.phx.gbl...
> > > Hi Robert,
> > >
> > > You can iterate through the numbers and do it with the following:
> > >
> > > Dim iNum As Integer
> > > Dim iLoop As Integer
> > >
> > > iNum =3D 75
> > >
> > > With Selection
> > > .HomeKey Unit:=3DwdStory
> > > For iLoop =3D 1 To 100 - 75
> > > With .Find
> > > .Text =3D CStr(iNum)
> > > .MatchWholeWord =3D True
> > > With .Replacement
> > > .ClearFormatting
> > > .Font.Bold =3D True
> > > End With
> > > .Execute Replace:=3DwdReplaceAll
> > > End With
> > > iNum =3D iNum + 1
> > > Next iLoop
> > > End With
> > >
> > > If you have your heart set on wildcards, then you can use =
something like
> > > the
> > > following:
> > >
> > > With Selection
> > > .HomeKey Unit:=3DwdStory
> > > With .Find
> > > .ClearFormatting
> > > .Text =3D "<[7][5-9]>"
> > > .MatchWildcards =3D True
> > > With .Replacement
> > > .ClearFormatting
> > > .Font.Bold =3D True
> > > End With
> > > .Execute Replace:=3DwdReplaceAll
> > >
> > > .Text =3D "<[8-9][0-9]>"
> > > .Execute Replace:=3DwdReplaceAll
> > > End With
> > > End With
> > >
> > > HTH,
> > > Dave
> > >
> > >
> > > "Robix" <address923@hotmail.com> wrote in message
> > > news:%238o3dJPQFHA.1172@TK2MSFTNGP12.phx.gbl...
> > >> Hi,
> > >>
> > >> I do not know if this is the right group to post this message.
> > >> I needed to search for the numbers between 75 and 99. I built 2 =
search
> > >> strings using wildcards (I am not using VBScript regular =
expressions).
> > >> One
> > >> for numbers from 75 to 79, and the second for the numbers from 80 =
to=20
> > >> 99.
> > > It
> > >> works fine. Anyway, I wonder if it is possible to build one =
search=20
> > >> string
> > >> that would find numbers between 75 and 99 using wildcards.
> > >>
> > >>
> > >> Thank you very much.
> > >> Regards,
> > >> Robert
> > >>
> > >>
> > >
> > >
> >
> >=20
>=20
>