![]() |
#10
|
|||
|
|||
![]()
Paul and Greg,
thank you very much for this. Both Greg's and Paul's solutions worked for me. I used this for flattening lists, they needed to be converted to plain text paragraphs (including the list number). This is probably going to end the issues we had with it concerning the italics. A trimmed down code example is now: Code:
Public Sub flattenLists() Dim strListNr As String Dim wPara As Word.Paragraph Dim wList as Word.List For Each wList In Word.ActiveDocument.Lists With wList For Each wPara In .ListParagraphs wPara.range.Select With wPara strListNr = .range.ListFormat.ListString .range.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph wPara.Range.ParagraphFormat.Reset .range.InsertBefore strListNr & Chr(32) End With Next End With Next End Sub Thanks again, Ruud |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA - (Re-) Setting a Table Style | mikejvir | PowerPoint | 2 | 12-04-2019 10:15 AM |
Why does paragraph inherit style of the following paragraph? | WADEVCAMP | Word VBA | 2 | 04-08-2019 02:13 PM |
Setting part of a paragraph bold | Fred256 | Word VBA | 4 | 10-07-2016 02:54 PM |
![]() |
Jennifer Murphy | Word | 3 | 02-16-2012 04:18 PM |
Character style stripped while applying paragraph style | sams_gates | Word | 0 | 08-29-2009 02:03 AM |