WordBasic.SelectSimilarFormatting

H

Hans List

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
 
H

Hans List

Hans said:
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
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
 
H

Hans List

Hi Edward,
Edward said:
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
 

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