View Single Post
  #5   Report Post  
Posted to microsoft.public.word.pagelayout
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Word Styles - Change ALL at once?

When you're testing, do so on a copy of the original document (just in
case).

--
Stefan Blom
Microsoft Word MVP


"SV" wrote in message ...
Ooo.. macros, cooooool... heh.. I've used a macro in Excel, but

never
considered it in Word.

I'll give it a shot, thanks!

Shane

"Stefan Blom" wrote in message
...
The following macro changes all paragraph styles set to 11 pt

Arial
Narrow to 12 pt Arial and copies the styles to the attached

template:

Sub ModifySomeStyles()
Dim counter As Long
Dim s As Style
For Each s In ActiveDocument.Styles
If s.Type = wdStyleTypeParagraph Then
If s.Font.Name = "Arial Narrow" And s.Font.Size = 11

Then
s.Font.Name = "Arial"
s.Font.Size = 12

'Delete the following 6 lines...
Application.OrganizerCopy _
Source:=ActiveDocument.FullName _
, Destination:=ActiveDocument _
.AttachedTemplate.FullName _
, Name:=s.NameLocal _
, Object:=wdOrganizerObjectStyles
'... if you don't want to copy to template

counter = counter + 1
End If
End If
Next s
MsgBox "Modified " & counter & " styles."

End Sub

--
Stefan Blom
Microsoft Word MVP


"SV" wrote in message
...
Greetings,
Thanks to Suzanne's help and pointers, I have a grasp of updating

styles.
First I learned basics of styles.. then of changing them...

coolness!

Now comes the fun... I have about 30 styles outlined in a

template
I
created (none of them are the 'usual' names like 'Normal" and

"Table
Grid"
and the like).

I've been asked to change ALL fonts that are Arial Narrow to

Arial
and all
that are 11 point to 12 point.
I can highlight/right-click/modify/automatically update & add to

template,
but it got me thinking:
Can I do a "Find and Replace" type action on STYLES so that all

of
my styles
go from 11 point Arial Narrow to 12 point Arial?

If I do find/replace in the document, I end up with new styles

that
have
"+12" and "+Arial" in their names. But now even my updated

template
won't
be of help, as they're all new names.


So, is there a way to do a global "12-point Arial" swap?

Thanks,
Shane