實現同時將一個word文檔中的所有表格執行“自動調整——根據窗口調整表格”操作

 Sub www()
    Dim oDoc As Document
    Dim oTable As Table
    Set oDoc = Documents.Open("D:\test\Sr.doc") '指定文件路徑
    For Each oTable In oDoc.Tables
        oTable.AutoFitBehavior (wdAutoFitWindow) '根據窗口調整內容
    Next
MsgBox "完成!"
End Sub


 

發佈了20 篇原創文章 · 獲贊 10 · 訪問量 11萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章