word VBA替换文字和删除页面问题!请各路大神前来帮助。。

2025-04-08 01:45:41
推荐回答(1个)
回答1:

示例代码如下:

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
    Next
End Sub