发布网友
共2个回答
热心网友
MsgBox ActiveDocument.Tables.Count
这个不能得到插入的excel表格,只能得到普通表格的个数
下面的语句可以得到excel表格的个数
For Each exsheet In ActiveDocument.InlineShapes
exsheet.OLEFormat.ClassType = "Excel.Sheet.8" Then
i = i + 1
End If
Next exsheet
MsgBox i
热心网友
用sql语句查询 用count(*)就行了