PDA

View Full Version : Help Macro Word for Numbers List and bullets list



aresgodwar
04-09-2015, 07:38 AM
Hello everyone


I have a problem with some documents I receive word in RTF format, the problem is that these documents are enumerated lists and bullets.
will use a macro to convert text but when it comes to large lists eg


a) - Tabulation - Language 1
b) - Tabulation - Text 2
c) - Tabulation - Text 3


1. Text
1.1 Text aa
1.2 Text ab
Text 1.3 ac
1.3.1 Text aa
1.3.2 Text aa
1.3.3 Text aa



a
b

. c
. d

does not comply, simply show only number 1 being repeated at all. and when the bullets come in special characters as a Point or a symbol in a widdings shown and not others


I could help, I'm two days looking for a solution for this macro.
I forgot'm new to Macros'm learning so recently.


The Code Macro is This
Dim r As Range
Dim lp As Paragraph
For Each lp In ActiveDocument.ListParagraphs
Set r = lp.Range
If r.ListFormat.ListType = wdListSimpleNumbering Then
lp.Range.ListFormat.ConvertNumbersToText
Else
lp.LeftIndent = 9
lp.FirstLineIndent = 0
lp.Alignment = wdAlignParagraphJustify
End If
Next
thank you very much for reading.