Jean-Guy
Thu Sep 29 09:35:12 CDT 2005
Santa Claus was telling us:
Santa Claus nous racontait que :
> Hi,
>
> I'm wanting to create a macro to change the font in all text boxes
> with a document. I'm guessing I need to select each box and change the
> properties....one at a time. Each document has different types of
> objects (Select All doesnt work).
>
> If any one can help with code so make a simple loop macro, I'd
> appreciate it.
>
Try this (There are two loops in case some of the Textboxes are inline with
the text):
Dim myShape As Shape
Dim myInlineShape As InlineShape
For Each myShape In ActiveDocument.Shapes
With myShape
If .TextFrame.HasText Then
.TextFrame.TextRange.Font.Bold = True
End If
End With
Next
For Each myInlineShape In ActiveDocument.InlineShapes
With myShape
If .TextFrame.HasText Then
.TextFrame.TextRange.Font.Bold = True
End If
End With
Next
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org