RE: Word numbering workaround

Subject: RE: Word numbering workaround
From: "Steve Hudson" <adslyy5g -at- tpg -dot- com -dot- au>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Wed, 18 Aug 2004 09:03:36 +1000


Quite an old solution I developed years ago. I also developed a second
solution, around the same time:

(Reposted from Word PC mailing list)

Those of you who have been hanging around this list sucking down words
of wisdom from all and sundry will remember my list restart
breakthrough - the first macro to attach to a toolbar / shortcut to
restart your list numbering, irrespective of the list type. Of course,
this failed to work with XP's List Styles. Ordinary styles with list
properties - sure - but List Styles proper - nope.

Well, I had a brainstorm the other night. I think it was a brainstorm,
my head was buzzing with pain and water was leaking out if it
everywhere, maybe it was just the 'flu. Regardless, I have just tested
the concept and it WORKS muck ya.

I got lucky - Word XP actually bothers to include the New Object list
styles into the Old Object ListParagraphs. This is enough information
for the few wise asses to mangle the old code to come up with a
solution. However, I also bothered to demangle the old code to not use
an on error trap.

Everyone has permission to redistribute and use this code at will,
providing the (c) notice is left intact. In the interests of reducing
Worders Compensation cases, please DO post to any lists, friends and
so on that you have access to. Let's see if we cant make this one of
the fastest spams in town.


Public Sub RestartListNumbering(Optional Scope As Range)
'(c) 1999-2004 Word Heretic steve -at- wordheretic -dot- com
'Restarts list numbering, 97-XP, all list implementations

Dim KillScope As Boolean

If Scope Is Nothing Then
Set Scope = Selection.Range
KillScope = True
End If

'Use first listpara

With Scope.ListParagraphs
If .Count > 0 Then
With .Item(1).Range.ListFormat
.ApplyListTemplate .ListTemplate, False
End With
End If
End With

'Destroy our objects

If KillScope Then Set Scope = Nothing
End Sub



-----Original Message-----
From: Chuck Martin


I've not seen this published before, and Microsoft's knowledgebase has an
incomplete (and not completely correct) article on the subject (at
http://support.microsoft.com/default.aspx?scid=kb;en-us;224736), but I
managed a workaround, kept all my hair intact (of course I ran into this
when I was doing a last-pass edit with managers wanting the document NOW),
and wanted to offer the solution that I found.

Now I know many of you, when you hear "Word," run away fast. Can';t say as I
blame you. I think Word issues are likely a major cause of the obesity
epidemic, as millions of Word users, chained to their desks as they jump
through all the hoops necessary to get out even the simplest Word documents,
take out their frustrations by noshing on every edible thing in sight.

But I digress.

This involves using Word's styles, styles that use numbering. In Word 2000.
Scared yet?

Yeah, I know, use SEQ fields. But doggone it, I shouldn't have to.

Anyway, the story is this. Scanning through the document, I come to a
sub-list that starts not with "a," but with "e." No problem, I think.
Format > Bullets and Numbering, then select the Restart Numbering radio
button.

Except that the Restart Numbering radio button is grayed out. The first
tinges of panic begin to creep into my consciousness. I *know* I've run into
this issue before. I'm pretty sure I've even posted a plaintive plea for
help right here, on this very list. So after a few failed attempts at
playing with Word's styles, I go to raycomm.com, click on the little Search
link in the upper right, and do a search for Word "Restart Numbering" grayed
out. Not much help in those results.

So I go to Microsoft's site. A search for Word 2000 "Restart Numbering"
results in the above article, which says the way to get the numbering
restarted is to do the exact procedure above, but work backwards, up the
list.

Yup, that's Microsoft. Work backwards and you'll be OK.

Well, hey, it's actually working. Last (4th) item on the list. Cool. The 3rd
item. Yup. 2nd item. Hey, this is gonna work! 1st item. Oops. The Restart
Numbering radio button is still grayed out.

Suddenly. a little light goes on in my brain. Well, maybe just a warm glow.
But, here's the trick I found.....

1. Create a new list item before the "first" one of the same type.
2. Go to your "real" first list item and set the Restart Numbering radio
button.
3. Hold your breath.
4. Delete that new list item above your "real" first one.

Note: I'm not sure #3 is really required, but that's exactly what I did, and
I haven't tested any other way, so I'm documenting what worked.

This deserved a spot in your little Word tricks file.



^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ROBOHELP X5: Featuring Word 2003 support, Content Management, Multi-Author
support, PDF and XML support and much more!
TRY IT TODAY at http://www.macromedia.com/go/techwrl

WEBWORKS FINALDRAFT: New! Document review system for Word and FrameMaker
authors. Automatic browser-based drafts with unlimited reviewers. Full
online discussions -- no Web server needed! http://www.webworks.com/techwr-l

---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.



Follow-Ups:

Previous by Author: RE: Top Ten Things You'd Like To Tell Engineers
Next by Author: RE: job title nomenclature on biz cards
Previous by Thread: Re: Word numbering workaround
Next by Thread: RE: Word numbering workaround


What this post helpful? Share it with friends and colleagues:


Sponsored Ads