Reply to topic  [ 4 posts ] 
Find style not working 
Author Message

Joined: 2015-06-26 23:30:40
Posts: 19
Hi --

I duplicated the macro "Find all and show context" (after I updated it so it worked) and edited it so the Find expression is a style. The dialog box pops up and shows that I want to find

Character Style "xref"

which is correct. There are 3 chunks of text in my document with this style. But it is saying there are no matches.

The statement where I set the Find expression is:

$findExp = $doc.styleWithName 'xref'

I've tried with both paragraph and character styles and still no results. Am I doing something wrong, or does this feature not really exist as documented?

"As of v2.0.5 the findText argument can also be a Style object instead of some text. If a style is given, then will match any text with that style applied."

I'm using 2.1.1.

Thanks -- Barbara

2015-06-27 17:00:56

Joined: 2015-06-26 23:30:40
Posts: 19
Well after much trial and error, I figured out that the Find box was set on Normal and it needed to be on one of the PowerFind settings. So I added that to the macro and it works.

2015-06-29 16:30:39
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Glad to see that you got it working. Just for info purposes you might take a look at the following macro:


2015-06-29 21:55:57

Joined: 2015-06-26 23:30:40
Posts: 19
I kind of did that. I used the "Find all and show context" and modified it to "Find all xref style and show context." The extra step of adding the xref style is the piece I had to figure out. I'm coming from FrameMaker, where you can search directly for xrefs. So I'll just have to remind myself (or create another macro!) to apply the style when I create the xref.

Thanks -- Barbara

2015-06-30 08:40:30
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software