Sub 处理表格和标题()
Dim i As Single, tt As String, r As Integer
Dim myrange As Range, para As Paragraph, t As Table
On Error Resume Next
For Each t In ActiveDocument.Tables
If InStr(t.Cell(1, 1).Range, "序号") > 0 Then
Set para = t.Cell(1, 1).Range.Paragraphs(1).Previous
Do While Not (para Is Nothing) 'search title
If InStr(para.Style, "标题") > 0 Then
tt = para.Range
Exit Do
Else
Set para = para.Previous
End If
Loop
Debug.Print para.Range.ListFormat.ListString, tt, t.Cell(2, 1).Range, t.Cell(2, 2).Range
End If
Next
MsgBox "ok"
End Sub