#1
|
|||
|
|||
Convert document to a multilevel list
I found this macro below that I thought might help, but it appears this macro is looking at a document that already has auto numbering applied.
The document I have is in outline from with a numbering sequence of I., A., 1., a., but it is all manually entered. All paragraphs in the outline are either Normal or List Paragraph. How can I get this entire document to have a multilevel list applied so I can adjust if needed afterwards? https://www.msofficeforums.com/word-...numbering.html |
#2
|
||||
|
||||
Frankly this is a horribly formatted document, with paragraph breaks instead of line wrapping, multiple tabs and, as you concede, manual numbering schemes. It works as it is, but there is no easy way to deal with changing the formatting to use autonumbering. It would take longer to figure out a macro to cope with all the anomalies than it would to reformat manually, using the existing Heading styles to set the levels, which you can then format to give the appearance you need.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Hi Graham and thank you for your time. Yes, agreed. The formatting is horrible, but this is what I have to work with. As far as all the other formatting, I can take care of that, just really trying to understand the application of the Heading styles. Here is a cleaned up document and the macro I cobbled together which of course does not work entirely. This is just a shortened version of a 9 page document and then there are another 3 to format. Manual of course is an option, but not one I'm excited about. Can you give some suggestion on this macro and how it can be fixed to cover all of the letter/number combinations?
Code:
Sub ConvertStyle() Dim orng As Range: Set orng = ActiveDocument.Range Dim opara As Paragraph Dim oParRng As Range Dim MyLtr As String Dim MyStyle As String For Each opara In orng.Paragraphs Set oParRng = opara.Range.Duplicate MyLtr = oParRng.Characters(1) Select Case MyLtr Case "I", "II", "III", "IV", "V", "VI": opara.Style = "Heading 1" Case "A", "B", "C", "D", "E", "F": opara.Style = "Heading 2" Case "1", "2", "3", "4", "5", "6": opara.Style = "Heading 3" Case "a", "b", "c", "d", "e", "f": opara.Style = "Heading 4" End Select Next opara lbl_Exit: Exit Sub End sub |
#4
|
||||
|
||||
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thank you Paul and Graham. I sure missed that part about the manual numbering.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cross-reference with full context a numbered list inside another multilevel list (list style) | MatLcq | Word | 0 | 02-01-2021 06:00 AM |
Convert multilevel bullet list to multilevel numbered list | scadaman29325 | Word | 2 | 03-27-2020 03:27 PM |
convert multilevel list to a true outline | markjkubicki | Word | 3 | 10-17-2018 10:12 AM |
How to convert table into multilevel list? | microsoftsloot | Word | 1 | 12-07-2015 10:55 PM |
Multilevel List | leaderofmarines | Word | 2 | 07-02-2013 05:02 AM |