Word multi-level list numbering extraction

jnrode
03-20-2009, 10:34 AM
Hi,

I have a word document structured as a multi-level list so:

1.0 Some text
1.1 Some more text
1.1.1 Some more text
1.1.2 More text
1.2 More
2.0 Text
etc

Is it possible to run a macro to extra a list of all the numbers? So:
1.0
1.1
1.1.1
1.1.2
1.2
2.0

Thanks,

Jim

Wamphyri
03-20-2009, 12:27 PM
I haven't touched word vba in a some time but something along the lines of what's below might get you thinking in the right direction

Dim v As Long, lstring As String, p As Paragraph

For Each p In ActiveDocument.Paragraphs
v = p.Range.ListFormat.ListValue
lstring = p.Range.ListFormat.ListString
MsgBox "List value " & v & " is represented by the string " & lstring
Next

jnrode
03-23-2009, 11:31 AM
Thanks, that did the trick nicely!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum