View Single Post
 
Old 11-25-2014, 06:05 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Ideally, you'd start by defining an appropriate Paragraph Style or Character Style for the textbox content. You'd then apply that Style to all the textboxes. From then on, if you want to change any of the font attributes in the textboxes, all you'd need to do is to update the Style definition. No code required.

The programming problem at this stage, then, becomes one of applying your Style. For that you could use code like:
Code:
Sub Demo()
Dim Shp As Shape
For Each Shp In ActiveDocument.Shapes
  With Shp
    If .Type = msoTextBox Then
      .TextFrame.TextRange.Style = "MyStyle"
    End If
  End With
Next
End Sub
where 'MyStyle' is your Style's name.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote