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 / December 2004

Tip: Looking for answers? Try searching our database.

Reset number via menu button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark - 24 Dec 2004 11:27 GMT
Hi there
I'm trying to set up a simple menu button which restarts the numbering in a
list without destroying the current style.

I have a bit of code which restarts the number list (see below) but
unfortunately also applies a style at the same time. Whenever I try to remove
the parts which apply a template it stops working - anyone got any Ideas?

Sub ResetNumbering()
   Selection.Range.ListFormat.ApplyListTemplate
ListTemplate:=ListGalleries( _
       wdOutlineNumberGallery).ListTemplates(7),
ContinuePreviousList:=False, _
       ApplyTo:=wdListApplyToWholeList,
DefaultListBehavior:=wdWord9ListBehavior
End Sub
Signature

Cheers

Mark

Word Heretic - 25 Dec 2004 02:17 GMT
G'day "Mark" <Mark@discussions.microsoft.com>,

Very close mate.

With Selection.Range.ListFormat
.ApplyListTemplate .ListTemplate,False
End With

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Mark reckoned:

>Hi there
>I'm trying to set up a simple menu button which restarts the numbering in a
[quoted text clipped - 12 lines]
>DefaultListBehavior:=wdWord9ListBehavior
>End Sub

Rate this thread:






 
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.