宏 word 批量根据表格内容调整宽度

Sub www()
Dim oDoc As Document
Dim oTable As Table
Set oDoc = Documents.Open("D:\test1012.doc") '指定文件路径
For Each oTable In oDoc.Tables
oTable.AutoFitBehavior (wdAutoFitWindow) '根据窗口调整内容
Next
MsgBox "完成!"
End Sub
    原文作者:tang1jun
    原文地址: https://blog.csdn.net/tang1jun/article/details/109646730
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞