none
MS Word 2010 - Line spacing between numbered list items is not preserving when saving as html RRS feed

  • Question

  • I tried this method from MSDN or this one from online to SUCCESSFULLY create more line spacing between numbered list item in a WORD 2010 document but for some reasons when I save the document as "HTML Filtered" the line spacing remains the same as it was before I changed it to the new spacing. On the other hand, as we know, if we manually change the line spacing in WORD doc by hitting "Shift+ENTER" after each list item, then the these manually created new line spacing between list items are preserved when I save the document as "Html Filtered".

    But I don't want to manually changing line spacing (by keep hitting "Shift+ENTER" after a list item) every time I need to save the doc as Html Filtered. I would like it to preserve the line spacing in HTML as well when the method described by above mentioned MSDN article is used on a WORD doc. Please help. Thanks..Nam



    • Edited by namwam Sunday, June 4, 2017 7:49 PM
    Sunday, June 4, 2017 6:09 PM

All replies

  • Hello,

    The 2nd link is invalid and I failed to reproduce your issue by changing line spacing.

    Before: Multiple 1.15

    After: Multiple 3

    If using "Shift+ENTER" would fix the issue, you could write some code to get the same effect as hitting shift+enter

    Please create a list and insert code as below:

    Sub Macro1()
    ActiveDocument.Content.Characters.First.Select
    Selection.Collapse (wdCollapseStart)
    For i = 1 To ActiveDocument.Content.ListFormat.CountNumberedItems(Level:=1)
    Call SE
    Next
    End Sub
    Sub SE()
        Selection.MoveEnd Unit:=wdLine, Count:=1
        i = Selection.Characters.Count
        Selection.Collapse (wdCollapseStart)
        Selection.MoveRight Unit:=wdCharacter, Count:=i - 1
        Selection.TypeText Text:=Chr(11)
        Selection.MoveDown Unit:=wdLine, Count:=1
    End Sub

    Then we could get the same result as i hit shift+enter at the end of each line

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 5, 2017 8:56 AM
    Moderator