In general, it is easier to work with ranges than with selections (and,
since ranges does not depend on the selection, there is no need to deselect,
either). For example, the following code:
If ActiveDocument.Content.Font.Name = "Tahoma" Then
ActiveDocument.Content.Font.Size = 15
End If
would change the font size of all text (in the body of the document) to 15pt
if the font name of that text is Tahoma.
But note that since you can specify the font on the character level, the IF
statement does not necessarily evaluate to TRUE.

Signature
Stefan Blom
Microsoft Word MVP
> hello everyone
> Ihave the following code to change font size.
[quoted text clipped - 9 lines]
> thanx
> ahmed
Hi FotoArt,
the easy thing at first.
selection.collapse
Then, there can be several issues.
If there are different fonts in the selection,
the condition would never be true.
To check it, try it with different fonts in the selection:
MsgBox Selection.Font.Name = "Arial"
Understandably, for sure.
But then, even if you have formatted
all of the doc in "Arial" and the doc is not quite small,
the condition would never be true.
I think I've read about that once,
but can't remember exactly.
However, for 11 pages of "The quick brwon fox",
the following code stops after character 21119!
Also
activedocument.range.font.name = "Arial"
returns false!
So you got to process smaller portions,
besides the first mentioned issue.
And google here for range vs. selection,
it's worth finding out the difference.
To the best of my knowledge.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Helmut Weber - 10 Sep 2007 16:03 GMT
>Also
>activedocument.range.font.name = "Arial"
>returns false!
that should be:
msgbox activedocument.range.font.name = "Arial"
returns false!
Helmut Weber - 10 Sep 2007 17:44 GMT
Sorry, ...
the following code:
Sub Macro3()
ActiveDocument.Range.Font.Name = "Arial"
MsgBox ActiveDocument.Range.Font.Name = "Arial"
ActiveDocument.Range(0, 0).Select
Dim lCnt As Long
Selection.ExtendMode = True
While Selection.Font.Name = "Arial"
Selection.MoveRight unit:=wdWord
Wend
MsgBox Selection.Characters.Count
End Sub

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Stefan Blom - 11 Sep 2007 08:38 GMT
> Hi FotoArt,
>
[quoted text clipped - 14 lines]
> all of the doc in "Arial" and the doc is not quite small,
> the condition would never be true.
I've read it too, somewhere, but I obviously didn't think of it when I
posted my reply. :-(
Thank you for clarifying this.

Signature
Stefan Blom
Microsoft Word MVP
> I think I've read about that once,
> but can't remember exactly.
[quoted text clipped - 13 lines]
>
> To the best of my knowledge.