Help! Need VBA to make long style auto numb. labels

L

LizW

I was informed that in order to make a longer label for a style than allowed
in the UI dialog box, I needed to use VBA. Since I haven't used VBA much,
except editing already recorded macros, can anyone suggest some code to
accomplish this? My exact sitatuation is below:

We inherited a styles at our law firm based on Heading 2 that does automatic
numbering. So when you click that style, it says REQUEST FOR PRODUCTION 1 and
when you press enter it goes to REQUEST FOR PRODUCTION 2 and so on. Someone
wanted to use this styles template for doing requests for ADMISSIONS
(instead of Production), so I
copied the template but when I tried to change the word "production" to
"admission" under the style, modify, format, numbering, customize dialog box,
there was a character limit, and I could only fit REQUEST
FOR ADMISSIO 1. I tried all kinds of ways to fit it but it wouldn't work.

I posted this question and was told it had to be done through VBA.

Thanks for any help!
 
J

Julie

LizW,

There is a recent thread on this in microsoft.public.word.numbering (Oct
2004).

Here's the sample that I posted in that thread

Sub Special()
Dim olt As ListTemplate
Set olt = ActiveDocument.Styles("Heading 1").ListTemplate

With olt
.ListLevels(1).NumberFormat = "Special Interrogatory No. %1"
.ListLevels(2).NumberFormat = "Response to Special Interrogatory No. %2"
End With

Set olt = Nothing

End Sub


Hopefully this is what you are looking for.

Regards,
Julie
 

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