2. IMO it would be possible to come up with a solution using SEQ fields,
Outline numbering, or even tables, but the SEQ approach is either complex or
not very automatic and the others wouldn't be very automatic. (i.e. you
would have to do something special every 26 rows).
3. How about either
a. using a different numbering scheme :-)
b. using the following approach, which would work for up to "ZZ" and could
be extended as long as there aren't nasty limits on docvariables:
- don't use Word automatic numberng
- create a docvariable called "n1" for "A", "n2" for "B", etc. (see the
VBA code below). You can create them in your template and they should then
be available in every document created from that template
- put the following nested field at the beginning of every paragraph:
{docvariable "n{seq n}"}
- ensure your users know that they have to refresh the field results if
they modify the list(s)
' VBA code to insert docvariables called n1, n2 etc. with values "A", "B",
.. "Z", "AA", "AB" etc.
Sub CreateListNumbers()
s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
k = 0
For i = 0 To 26
If i = 0 Then
c1 = ""
Else
c1 = Mid(s, i, 1)
End If
For j = 1 To 26
k = k + 1
ActiveDocument.Variables.Add Name:="n" + Trim(Str(k)), Value:=c1 &
Mid(s, j, 1) & "."
Next j
Next i
End Sub
4. You could obviously add a tab character to the end of each docvariable,
etc. etc.
5. I can't help feeling there's a really, really simple way to do this but
that's my best shot!
Peter Jamieson
Sandi <spap...@alvine.com> wrote in message
news:37570DD2...@alvine.com...
Sorry Sandi:
Peter's right: You are asking Word to count to the Base 26, and it
can't.... If you want it, you have to code it yourself.
Coding any form of automatic numbering is a fairly solid programming
task (you have to find the previous number, look it up, increment it,
set the result MOD 26, print what you've got, unless it's 0, when you
increment everything...)
Not easy to make it work.
Cheers.
John McGhie <jo...@mcghie-information.com.au>
Consultant Technical Writer
Microsoft MVP (Word)
Melbourne, Australia (GMT +10 hrs) +61 (04) 1209 1410
1. Thanks for the response.
2. After thinking about it a bit more, this solution seems pretty
straightforward - if you run the macro once in your template, documents
based on it should have all the necessary docvariables pre-defined.
3. OTOH using a built-in numbering scheme is probably even more
straightforward.
Peter Jamieson
Sandi <spap...@alvine.com> wrote in message
news:375D9AC2...@alvine.com...
2. Sorry, I tend to think in terms of fields rather than post-op VBA
solutions.
1. Yes, it's another of those cases where a tiny bit more end-user
programmability in either autonumbering or fields would make the whole
package so much more versatile.
Peter
John McGhie <johnm...@optusnet.com.au> wrote in message
news:37611d30...@msnews.microsoft.com...
> On Tue, 08 Jun 1999 17:35:46 -0500, Sandi <spap...@alvine.com>
> wrote:
>
> >Peter, thanks for your reply to our numbering wishes. Though I don't
feel the
> >solutions are ideal, they've given me some ideas to pursue, which I will.
I,
> >too, feel there must be a simpler approach. If anyone has an idea for
us, I'm
> >still listening. I appreciate your help!
> >
Sandi
Here is my two cents worth
I use a variation of this little program to do what you want (I hope) I
haven't seen the other solutions
DECLARE SUB ALPHAGRID ()
COMMON SHARED Alphastart$, AlphaEnd$
COMMON SHARED XLET$(), EndLetters, Ainit
DIM XLET$(1000)
CLS
ALPHAGRID
SUB ALPHAGRID
INPUT "Please Enter Start Letter "; Alphastart$
INPUT "Please Enter End Letter "; AlphaEnd$
Alphastart$ = UCASE$(Alphastart$)
AlphaEnd$ = UCASE$(AlphaEnd$)
EndLetters = (ASC(RIGHT$(AlphaEnd$, 1)) - 64)
EndLetters1 = (ASC(LEFT$(AlphaEnd$, 1)) - 64)
IF LEN(AlphaEnd$) = 2 THEN
EndLetters = (26 * EndLetters1) + EndLetters
END IF
Ainit = (ASC(RIGHT$(Alphastart$, 1)) - 64)
AINIT1 = (ASC(LEFT$(Alphastart$, 1)) - 64)
IF LEN(Alphastart$) = 2 THEN
Ainit = (26 * AINIT1) + Ainit
END IF
Ainit = Ainit - 1
ALPHA1 = ASC(RIGHT$(Alphastart$, 1)) - 1
IF LEN(Alphastart$) = 2 THEN ALPHA2 = ASC(LEFT$(Alphastart$, 1))
IF ALPHA2 < 64 THEN ALPHA2 = 64
FOR I = 1 TO EndLetters - Ainit
ALPHA1 = ALPHA1 + 1
IF ALPHA1 = 91 THEN
ALPHA2 = ALPHA2 + 1
ALPHA1 = 65
END IF
IF ALPHA2 <> 64 THEN
XLET$(I) = CHR$(ALPHA2) + CHR$(ALPHA1)
ELSE
XLET$(I) = CHR$(ALPHA1)
END IF
NEXT
END SUB
(-8
--
Howard Walker