2012-08-16 695 views

回答

4

您可以直接引用嵌套表。使用以下命令可以获取文档中第一个表格中包含的表格数量。

Debug.Print ThisDocument.Tables(1).Tables.Count 

您可以根据需要再通过他们循环,进行格式化:

Dim oTable as Table 

For Each oTable in ThisDocument.Tables(1).Tables 

    'Do something with oTable - like 
    'setting the width of the first column 
    oTable.Columns(1).Width = 60 

Next 

不要忘了检查,看看有表格文档中第一。 :)

+0

这太神奇了 - 我很高兴它完美的作品:) – nicemanda 2012-08-17 00:17:31

+0

+ 1很好完成Olle :) – 2012-08-17 06:04:44