问题1:
    For Each nx In ActiveDocument.Shapes
    If InStr(nx.Name, "WordArt") Then fs = fs + 2
      MsgBox fs
    Next
上面代码是判断有没有插入艺术字的
我想在判断插入艺术字的样式,字体,字号要怎么样判断问题2:
MsgBox ActiveDocument.Tables.Count > 0   
这个代码是判断有没有插入表格
我想在判断插入表格的列数 和 行数要怎么样判断

解决方案 »

  1.   

    问题2:Sub macro2()
    MsgBox "表格的行数和列数分别为: " & ActiveDocument.Tables(1).Rows.Count & "*" & ActiveDocument.Tables(1).Columns.Count
    End Sub
      

  2.   

    问题1:Sub macro1()
        Dim myShape As Shape, s(4) As String
        For Each myShape In ActiveDocument.Shapes
        If myShape.Type = msoTextEffect Then
        s(0) = "名称:" & myShape.Name
        s(1) = "文本:" & myShape.TextEffect.Text
        s(2) = "字体:" & myShape.TextEffect.FontName
        s(3) = "字号:" & myShape.TextEffect.FontSize
        s(4) = "对齐方式:" & myShape.TextEffect.Alignment
         MsgBox Join(s, vbCrLf)
        End If
        Next
    End Sub
      

  3.   

    为什么我运行   macro1 () 没有反应的?