Results 1 to 4 of 4
  1. #1
    Bronze Lounger IanWilson's Avatar
    Join Date
    Dec 2000
    Location
    Bristol, United Kingdom
    Posts
    1,523
    Thanks
    0
    Thanked 1 Time in 1 Post

    Convert numbered list? (All)

    Is there a way of converting a numbered list that has been generated using Word's automatic list numbering process and converting it into plain text, that is just paras with the numbers as ordinary text and a hanging indent? (Other than going through and changing it all by hand.)

    Ian

  2. #2
    Star Lounger
    Join Date
    Jul 2006
    Location
    Colorado, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Convert numbered list? (All)

    Here is one possibility:

    Sub UnList()
    Dim objPara As Paragraph
    Dim n As Long

    For n = ActiveDocument.Paragraphs.Count To 1 Step -1
    Set objPara = ActiveDocument.Paragraphs(n)
    If objPara.Style Like "Heading *" Then
    objPara.Range.Select
    objPara.Range.Text = objPara.Range.ListFormat.ListString & " " & objPara.Range.Text
    Set objPara = ActiveDocument.Paragraphs(n)
    objPara.Range.Style = "Normal"
    objPara.FirstLineIndent = -InchesToPoints(0.5)
    End If
    Next

    End Sub

    This assumes that the numbering is based on Heading 1 through whatever. You have to go backwards through the paragraphs, otherwise they all get the number 1 or 1.1, etc. Change the indent or style as you wish.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Convert numbered list? (All)

    Well, you can copy and Edit>Paste Special as Unformatted text, but then you lose ALL the formatting...

    You could try VBA. Playing with the Immediate window, both of these seem to work with tiny test lists:

    <code> activedocument.Lists(1).ConvertNumbersToText
    selection.Range.ListFormat.ConvertNumbersToText</code>

  4. #4
    Bronze Lounger IanWilson's Avatar
    Join Date
    Dec 2000
    Location
    Bristol, United Kingdom
    Posts
    1,523
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Convert numbered list? (All)

    Thanks, Jefferson.

    I used the second one, attached it to a toolbar button and it does just what I wanted. <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

    Ian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •