Reply
 
Thread Tools Display Modes
  #1   Report Post  
Makhtar
 
Posts: n/a
Default wildcard find spanning the text of hyperlink

I am trying to do a wildcard search that should begin its match in the text
of a hyperlink and continue to match characters outside of the hyperlink. It
seems like the boundary of the hyperlink contains a character that I cannot
match.

I can break the search into two pieces and each component works properly.
The two expressions find text that appears to be contiguous, but when the
components are combined into one search, it does not match.

Here is a very simplified example where the a tag indicates the link, but
does not actually appear in the text of the Word document.

Word Document - aThe Link/a does not match

Find - The link?

No match

I hope I have explained the problem clearly and someone can help. Thanks.
  #2   Report Post  
Klaus Linke
 
Posts: n/a
Default

Hi Makhtar,

Sorry: Wildcards don't work at all with fields.

Maybe you can match the text with a regular "Find"?
^? will then match any character (... if I read your "Find - The link?" =
correctly that you want to match the field and the following character).

Else, you'd need to locate the hyperlink field (with Find or by looping =
all fields) and then have the maco select the text as neccessary.

Regards,
Klaus


"Makhtar" wrote:
I am trying to do a wildcard search that should begin its match in the =

text=20
of a hyperlink and continue to match characters outside of the =

hyperlink. It=20
seems like the boundary of the hyperlink contains a character that I =

cannot=20
match.
=20
I can break the search into two pieces and each component works =

properly.=20
The two expressions find text that appears to be contiguous, but when =

the=20
components are combined into one search, it does not match.
=20
Here is a very simplified example where the a tag indicates the =

link, but=20
does not actually appear in the text of the Word document.
=20
Word Document - aThe Link/a does not match
=20
Find - The link?
=20
No match
=20
I hope I have explained the problem clearly and someone can help. =

Thanks.
  #3   Report Post  
Makhtar
 
Posts: n/a
Default

Thanks for the quick response Klaus. I can't use a regular find. I had
simplified the example to demonstrate the problem, but my actual expression
after the link is more complicated. I was hoping I could do it with a single
search and replace, but you are right, I will need to write some real code to
select the text.

Thanks again,
Makhtar

"Klaus Linke" wrote:

Hi Makhtar,

Sorry: Wildcards don't work at all with fields.

Maybe you can match the text with a regular "Find"?
^? will then match any character (... if I read your "Find - The link?" correctly that you want to match the field and the following character).

Else, you'd need to locate the hyperlink field (with Find or by looping all fields) and then have the maco select the text as neccessary.

Regards,
Klaus


"Makhtar" wrote:
I am trying to do a wildcard search that should begin its match in the text
of a hyperlink and continue to match characters outside of the hyperlink. It
seems like the boundary of the hyperlink contains a character that I cannot
match.

I can break the search into two pieces and each component works properly.
The two expressions find text that appears to be contiguous, but when the
components are combined into one search, it does not match.

Here is a very simplified example where the a tag indicates the link, but
does not actually appear in the text of the Word document.

Word Document - aThe Link/a does not match

Find - The link?

No match

I hope I have explained the problem clearly and someone can help. Thanks.


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
How do I turn select text on and use Find to select a block of te. hpmted Microsoft Word Help 2 April 13th 05 12:32 AM
how do I find a hyperlink target in a word document infomaster Microsoft Word Help 0 March 17th 05 01:17 PM
Mirror Text Box [email protected] Formatting Long Documents 1 January 24th 05 07:02 PM
change all caps in text to small lettering using find and replace. Jackson State New Users 3 January 13th 05 06:41 AM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM


All times are GMT +1. The time now is 07:35 PM.

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"