Override Built-in Numbered Style (Word 2003)

C

Carl

I'm wondering if anyone can help. I'm sure at one point I came across an
article about re-defining the built-in Numbered style. So, when you wanted
the users to click on the 123 button in the toolbar, you get your custom
Numbered list, rather than Words version. I have tried adding the 'Numbered'
style to normal.dot but it doesn't work.

Do you have a way of doing this or is it just not possible?
 
S

Stefan Blom

A relatively simple solution is the following: Modify the List Number style
to suit your needs. Then put the below macro in the Normal template; the
macro intercepts the FormatNumberDefault command, which is run whenever a
person clicks the Number button on the toolbar.

Sub FormatNumberDefault()

Dim BulletStyleName As String
Dim AppliedStyleName As String
BulletStyleName = _
ActiveDocument.Styles(wdStyleListNumber).NameLocal
AppliedStyleName = Selection.Paragraphs(1).Style.NameLocal
If BulletStyleName = AppliedStyleName Then
Selection.Style = wdStyleNormal
'If you prefer Body Text, use wdStyleBodyText instead
Else
Selection.Style = BulletStyleName
End If

End Sub

The macro applies the List Number style if the first paragraph in the
selection does not have that style applied. Otherwise it applies the Normal
style.

If you need installation assistance, see
http://www.gmayor.com/installing_macro.htm.
 

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