需讓表格在列印/輸出 PDF 時不顯示邊框,但編輯時仍保留輔助格線,有兩種標準做法:設定邊框為「無」或設定邊框顏色與背景同色(通常為白色)。



設定邊框為「無」操作流程
缺點:若文件背景非白色(如套用頁面底色),白色邊框會變明顯;且編輯畫面看不見邊框,難以判斷儲存格範圍。
Sub HideAllTableBorders()
Dim tbl As Table
Application.ScreenUpdating = False
For Each tbl In ActiveDocument.Tables
With tbl
.Borders(wdBorderTop).LineStyle = wdLineStyleNone
.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
.Borders(wdBorderRight).LineStyle = wdLineStyleNone
.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
.Borders(wdBorderVertical).LineStyle = wdLineStyleNone
End With
Next
Application.ScreenUpdating = True
MsgBox "所有表格邊框已隱藏(列印不顯示,編輯保留格線)。"
End Sub
掌握「無邊框」設定,即可製作乾淨專業的無框表格版面。