0
我的代碼應該是更新Word文檔中表格的樣式,然後將寬度更改爲17釐米。更改表格的樣式和格式
Sub ConvertTables()
Dim tbl As Table
For Each tbl In ActiveDocument.Tables
tbl.Style = "K2 Table"
Next
Selection.Tables(1).PreferredWidthType = wdPreferredWidthPoints
Selection.Tables(1).PreferredWidth = CentimetersToPoints(17)
End Sub
當我運行宏時,它停在第二部分。有時它會在VB查看器中運行,但不會通過Developer運行宏。
這塊VBA有什麼問題?
是的,你是正確的就不起作用。非常感謝:) –
不客氣!隨意標記爲已回答 – Jbjstam