Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

How do I select all text with a specifc style?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daren - 20 Jan 2006 16:21 GMT
When viewing the document styles using the task pane, it is possible to
select all instances of text using a specific style - how do I replicate that
in code? I tried recording a macro whilst using the task pane to no avail.

Thanks.
Daren - 20 Jan 2006 17:29 GMT
Nevermind - I forgot you could specify a style for the find method.

> When viewing the document styles using the task pane, it is possible to
> select all instances of text using a specific style - how do I replicate that
> in code? I tried recording a macro whilst using the task pane to no avail.
>
> Thanks.
Klaus Linke - 20 Jan 2006 21:01 GMT
>> When viewing the document styles using the task pane, it is possible to
>> select all instances of text using a specific style - how do I replicate
>> that
>> in code? I tried recording a macro whilst using the task pane to no
>> avail.

> Nevermind - I forgot you could specify a style for the find method.

Hi Daren,

The command would be WordBasic.SelectSimilarFormatting

That works with manual formatting (the "pseudo-styles" that you see in the
"Styles and formatting" pane with "Keep track of formatting" on), too.

Greetings,
Klaus
Daren - 20 Jan 2006 21:23 GMT
Thanks for the reply.

> >> When viewing the document styles using the task pane, it is possible to
> >> select all instances of text using a specific style - how do I replicate
[quoted text clipped - 13 lines]
> Greetings,
> Klaus
Klaus Linke - 20 Jan 2006 21:30 GMT
You're welcome! I never tried which is faster... but use "Find", too, since
it gives you more control.

Greetings,
Klaus
Klaus Linke - 20 Jan 2006 21:33 GMT
> I never tried which is faster...

Argh... "Find" is faster.
"Select similar formatting" often takes minutes on documents of some size.

Klaus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.