MS Office Forum / Word / Numbering / December 2006
How to properly end a Numbered List
|
|
Thread rating:  |
Karitaat - 25 Oct 2006 14:58 GMT Hi,
I have used Shauna Kelly's 'cookbook' to set up List Bullet styles. And, in the same way, set up List Number styles.
I understand her warning NOT to use the toolbar bullet button. However my colleagues WILL use it, so I have convinced the Bullets and Numbering buttons to work with a Bulleted/Numbered List. This nearly emulates the 'normal' behaviour of Word... except for one point.
Let's say I start a numbered list: 1. One <Style: List Number> 1.1 Two <Style: List Number 2> 1.2 Three <Style: List Number 2>
Hitting the Enter twice after 'Three' will stop the numbering, but leave me in Style "List Number 2"
Is there a way to (automatically) return to e.g. wdStyleBodyText?
regards, peter
Stefan Blom - 25 Oct 2006 15:07 GMT Create a toolbar for the template with buttons to apply the proper style. That will make it easier for your colleagues.
 Signature Stefan Blom Microsoft Word MVP
> Hi, > [quoted text clipped - 19 lines] > regards, > peter Karitaat - 25 Oct 2006 16:06 GMT Stefan,
Thank you for your quick response.
Yes: I offer my colleagues such a Template with a 'Normal' button. But the whole idea behind that template is that I have programmed Word to click some buttons, in stead of asking my colleagues to click them.
Now: is there a way to automatically return to e.g. wdStyleBodyText?
regards, peter
Stefan Blom schreef:
> Create a toolbar for the template with buttons to apply the proper > style. That will make it easier for your colleagues. [quoted text clipped - 28 lines] > > regards, > > peter Stefan Blom - 26 Oct 2006 09:38 GMT Well, the easiest method would be to just change the caption of that button to "Stop numbering" or something similar.
Of course, this doesn't take care of cases where people press Enter twice. You could ask in a programming newsgroup, such as microsoft.public.word.vba.general, if there is a way to intercept that action.
 Signature Stefan Blom Microsoft Word MVP
> Stefan, > [quoted text clipped - 43 lines] > > > regards, > > > peter Karitaat - 26 Oct 2006 09:42 GMT Numerici,
to paraphrase Paul Simon:
The problem is all inside your head She said to me The answer is easy if you Take it logically I'd like to help you in your struggle To be free There must be fifty ways To leave your numbers
I misunderstood...
If you start a numbered or bulleted list in the 'normal' way (that is: through both standard buttons) Word uses the same Style as the Paragraph immediately preceeding the list. The list has that same Style, with -- as a property -- a bullet/number. If you quit the list (by hitting Enter twice) Word simply removes that 'property'. You can also quit the list by clicking on the button: in that case Word removes the 'property' Bullet (but, strangely, only the indent of Level 1; NOT the indent of higher Levels).
Now: in the Shauna Kelly setup (that I use) the numberingscheme depends on List Styles. I figure that the only way to see if an Enter is given on an empty paragraph with Style 'List Number ?' or 'List Bullet ?' would be setting up an Event. And that is a price I do not want to pay. But.. my modified 'Bullet' and 'Numbering' buttons behave as a toggle. List On/Off.
Easy: you start a Bulleted list with a Button, you end it with that button. Now that is something that I can tell my colleagues.
Of course they forget, and keep on typing in Style 'List Bullet 3' forever. My 'garbage collection' needs to identify and gently repair those Paragraphs.
Like the poets sing:
Last thing I remember I was running for the door I had to find the passage back to the place I was before "Relax," said the night man, "We are programmed to receive You can check out any time you like But you can never leave"
regards, peter
Karitaat schreef:
> Stefan, > [quoted text clipped - 43 lines] > > > regards, > > > peter Stefan Blom - 30 Oct 2006 10:33 GMT You can even intercept the FormatNumberDefault and FormatBulletDefault commands and make them toggle between a properly numbered (bulleted) style and, say, Body Text.
 Signature Stefan Blom Microsoft Word MVP
> Numerici, > [quoted text clipped - 97 lines] > > > > regards, > > > > peter Karitaat - 30 Oct 2006 11:00 GMT Stefan,
Agreed... 'my' buttons (that intercept FormatNumberDefault and FormatBulletDefault) toggle between their ListNumbers and BodyText. This means that my colleagues just have to click the respective button again, to poperly end the List (and come in BodyText).
But: I was trying to find a way to intercept <Enter><Enter>. I came to the conclusion: I shouldn't.
Thanks for coming back to me.
regards, peter
Stefan Blom schreef:
> You can even intercept the FormatNumberDefault and FormatBulletDefault > commands and make them toggle between a properly numbered (bulleted) [quoted text clipped - 123 lines] > > > > > regards, > > > > > peter Stefan Blom - 30 Oct 2006 11:55 GMT As I wrote, you could perhaps get assistance with the Enter key in a programming newsgroup, but, if it is even possible, you may not find it worth the trouble.
However, in my previous message I was referring to creating sub-routines named "FormatNumberDefault" and "FormatBulletDefault" in an add-in; that way, you wouldn't even have to use custom toolbar buttons. Instead, Word would run your code whenever trying to invoke the built-in commands. Maybe you're already aware of this technique. If not, you can find (general) information on it in the article at http://word.mvps.org/faqs/macrosvba/InterceptSavePrint.htm.
 Signature Stefan Blom Microsoft Word MVP
> Stefan, > [quoted text clipped - 140 lines] > > > > > > regards, > > > > > > peter Karitaat - 30 Oct 2006 12:39 GMT Stefan,
Thank you for thinking with me.
I realise I have not been completely clear. Yes: I have 'hijacked' the Word Bullets- and Numbering-buttons through adding macro's called "FormatNumberDefault" and "FormatBulletDefault" to my Template. This is indeed the easiest way to coerce the user to the behaviour I want.
Now: changing the behaviour of <Enter><Enter> will (in my mind) involve setting up an Event. And I don't like to do that for this case.
The way I have now set it up user can (properly) quit the List-bullets/numbers by: 1) pressing the 'hijacked' Word button Bullets/Numbering on an empty paragraph 2) pressing a special (custom) 'Normal' button that applies wdStyleBodyText Yes: it takes one mouseclick.
<Enter><Enter> will leave him in a List-style. Just like <Enter><Enter> in a non-'hijacked' situation will leave him in the Style of the previous Bullet/Number (however: that would be BodyText).
Other than Events I don't think there is a way to tweak that. So: I document it, improve my garbage-collection and hope for the best.
regards, peter
Stefan Blom schreef:
> As I wrote, you could perhaps get assistance with the Enter key in a > programming newsgroup, but, if it is even possible, you may not find [quoted text clipped - 174 lines] > > > > > > > regards, > > > > > > > peter Stefan Blom - 30 Oct 2006 15:04 GMT Well, I justed wanted to make sure that we were talking about the same thing.
I'm glad you've found a solution that works for your.
 Signature Stefan Blom Microsoft Word MVP
> Stefan, > [quoted text clipped - 177 lines] > > > > > > > > > > > > > > "Karitaat" wrote in message news:1161784724.335936.153970@m7g2000cwm.googlegroups.com...
> > > > > > > > Hi, > > > > > > > > [quoted text clipped - 30 lines] > > > > > > > > regards, > > > > > > > > peter Jonathan West - 21 Dec 2006 14:53 GMT > Stefan, > [quoted text clipped - 23 lines] > in the Style of the previous Bullet/Number (however: that would be > BodyText). This is a serious shortcoming in Word.
> Other than Events I don't think there is a way to tweak that. > So: I document it, improve my garbage-collection and hope for the best. Even events are not very good at dealing with this. The WindowSelectionChange event is the nearest available event, and it doesn't really meet the need, because it doesn't fine when you actually press Enter or type text in. It only fires when you move the cursor using the arrow keys or the mouse. There is no KeyPress event in Word, at least not when the focus is on a document editing window.
You can't use the Tools Customize dialog to assign a macro to the Enter key, though you can do this through VBA by adding an item to the KeyBindings collection. However, if you have AutoText entries, and you type in part of an Autotext entry name, you will see a tooltip asking you to press Enter in order to insert the AutoText. But if you have assigned a macro to the Enter key, the macro is run instead of the Autotext entry being inserted, which will severely flummox your users.
 Signature Regards Jonathan West - Word MVP www.intelligentdocuments.co.uk Please reply to the newsgroup Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
|
|
|