Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LizW - 30 Oct 2004 20:41 GMT
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!
Julie - 01 Nov 2004 00:21 GMT
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

>I was informed that in order to make a longer label for a style than
>allowed
[quoted text clipped - 19 lines]
>
> Thanks for any help!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.