This seems to work:
Sub ConvertListsInTableToNumbered() Dim tbl As Table Dim cell As cell Dim para As Paragraph 'Define the table we want to process Set tbl = ActiveDocument.Tables(1) ' Change the table index as needed 'Loop through each cell in the table For Each cell In tbl.Range.Cells 'Loop through each paragraph in the cell For Each para In cell.Range.Paragraphs para.Range.Select 'Check if the paragraph has a numbered or bulleted list format If para.Range.ListFormat.ListType <> wdListNoNumbering Then 'Convert the list to a numbered list para.Range.ListFormat.ApplyListTemplate ListTemplate:= _ ListGalleries(wdNumberGallery).ListTemplates(2), _ ContinuePreviousList:=False, ApplyTo:=wdListApplyToWholeList, _ DefaultListBehavior:=wdWord10ListBehavior Exit For End If Next para Next cell End Sub




Reply With Quote
