示例代码如下:
Sub 宏1() For i = 1 To ThisDocument.Tables.Count s = ThisDocument.Tables(i).Cell(1, 2).Range.Text If Trim(s) = "" Then MsgBox ("无数据" & s) Else MsgBox ("有数据" & s) End If NextEnd Sub