Find character style or para style without return

N

neetz

Hi -- I want to be able to mark various unrelated words throughout a
text in a hidden way so they can be quickly found. This is so that
written plans can be updated annually quickly.

I figured out how to define a new style and apply it to any word (my
skills are basic as you can see). I also found someone's macro online
and figured out how to run a macro. However, I can search for a style
successfully only if I apply it to a whole paragraph, which does not
suit my purpose. I need to be able to search for single words embedded
within paragraphs.

Here is the macro (below). Can it be modified to search for characters
with a given style? Or is there some other way? This would be an
incredible timesaver!!

Thank you for any advice. I'll keep reading to learn more, too.

Sub FindHeadingStyle()
Selection.Find.Style = ActiveDocument.Styles("Heading 8")
Selection.Find.Execute
End Sub
 
N

neetz

Hi -- I want to be able to mark various unrelated words throughout a
text in a hidden way so they can be quickly found. This is so that
written plans can be updated annually quickly.

I figured out how to define a new style and apply it to any word (my
skills are basic as you can see). I also found someone's macro online
and figured out how to run a macro. However, I can search for a style
successfully only if I apply it to a whole paragraph, which does not
suit my purpose. I need to be able to search for single words embedded
within paragraphs.

Here is the macro (below). Can it be modified to search for characters
with a given style? Or is there some other way? This would be an
incredible timesaver!!

Thank you for any advice. I'll keep reading to learn more, too.

Sub FindHeadingStyle()
Selection.Find.Style = ActiveDocument.Styles("Heading 8")
Selection.Find.Execute
End Sub

For Pete's sake all I had to do was, in the formatting bar, choose a
style and press Select All. Sorry; I had been searching for hours for
a more complicated way.
 
C

Clive Huggan

For Pete's sake all I had to do was, in the formatting bar, choose a
style and press Select All. Sorry; I had been searching for hours for
a more complicated way.


Maybe this will be handy if all you want to do is find the words (though I
realize what you are doing, and often do it myself in another context):

I sometimes use a "#" character in the text (actually, often more than one
-- more of them for higher-priority items) in lieu of Word's "Comments"
feature to mark some text that I want to check or go back to.

For your purpose I would most probably format the "#" in hidden text.

I would drop it in as an AutoCorrect item -- typing say "hhc" (meaning
hidden hash character) would insert it.

For more information on inserting remarks, take a look at page 125 of some
notes on the way I use Word for the Mac, titled "Bend Word to Your Will",
which are available as a free download from the Word MVPs' website
(http://word.mvps.org/Mac/Bend/BendWordToYourWill.html).

[Note: "Bend Word to your will" is designed to be used electronically and
most subjects are self-contained dictionary-style entries. If you decide to
read more widely than the item I've referred to, it's important to read the
front end of the document -- especially pages 3 and 5 -- so you can select
some Word settings that will allow you to use the document effectively.]

Cheers,

Clive Huggan
Canberra, Australia
(My time zone is 5-11 hours different from the Americas and Europe, so my
follow-on responses to those regions can be delayed)
====================================================
 
J

John McGhie

For Pete's sake all I had to do was, in the formatting bar, choose a
style and press Select All. Sorry; I had been searching for hours for
a more complicated way.

I know the feeling :) Just for future reference, the style you were
choosing, "Heading 8" is a "Paragraph" style type. It cannot be applied to
anything less than a full paragraph.

If you wish to dispute this, go ahead, and I will try to explain how they
make it appear to work (but it doesn't)... :)

Cheers

--

Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Nhulunbuy, NT, Australia. mailto:[email protected]
 

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