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 / March 2007

Tip: Looking for answers? Try searching our database.

WordBasic.SelectSimilarFormatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hans List - 27 Feb 2007 19:05 GMT
Hi,

Am I wrong, or was SelectSimilarFormatting introduced in
Word Xp or Word 2003?

How come that the complete syntax is:

WordBasic.SelectSimilarFormatting

With the old WordBasic part?

I cannot find info in the Help. How can I select macrowise
all parts with a certain font?

E.g.:

WordBasic.SelectSimilarFormatting(Font:TimesNewRoman)?

Thanks!

Hans List
Hans List - 27 Feb 2007 19:40 GMT
> Hi,
>
[quoted text clipped - 17 lines]
>
> Hans List
I read in a posting from Cindy that this particular command
probably as been forgotten by the development team: they
didn't convert it to VBA.

Anyway, this works:

Sub SelectAllInstancesOfFont()

    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = ""
        .Font.Name = "Arial"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute
    WordBasic.SelectSimilarFormatting
End Sub

There is no other way to simulate the 'Mark all instances'
box (don't know it's English name) except from:

Selection.Find.Execute
WordBasic.SelectSimilarFormatting ?

Hans List
Edward Thrashcort - 27 Feb 2007 20:30 GMT
There's a copy of the old WordBasic HLP file at
http://www.easyhtmlhelp.com/files/wordbasic.zip

SelectSimilarFormatting does not seem to have been
documented in Office 95 either.

I suspect it was introduced with Word 2002.

Eddie

> *From:* Hans List <hans.list@gmail.com>
> *Date:* Tue, 27 Feb 2007 20:40:30 +0100
[quoted text clipped - 53 lines]
>
> Hans List
Hans List - 01 Mar 2007 07:57 GMT
Hi Edward,
> SelectSimilarFormatting does not seem to have been
> documented in Office 95 either.
>
> I suspect it was introduced with Word 2002.

After some reading on the net, I suspect the same.

I'm curious, what the syntax will be in Word 2007 (which I hope to get
in a week of two, together with a new pc ;-)).

Hans List
 
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.