如果文档中的代码表格时,感觉还是很快速有用的. Sub HangHao() ' ' hanghao 宏 ' ' Dim parag As Paragraph Dim nLineNum: nLineNum = 0 Dim selRge As Range Set selRge = Selection.Range For Each parag In Selection.Paragraphs nLineNum = nLineNum + 1 bgNLineNum = nLineNum selRge.Par