wildcard find spanning the text of hyperlink

M

Makhtar

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 - <a>The Link</a> does not match

Find - The link?

No match

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

Klaus Linke

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
 
M

Makhtar

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
 

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

Top