2018-03-24|閱讀時間 ‧ 約 3 分鐘

【WORD VBA】表格加邊框線條加黑網底變白

Sub 表格加邊框線條加黑網底變白()
Dim borderLoop As Border
Dim i, s As Integer
i = ActiveDocument.Tables.Count
For s = 1 To i
If ActiveDocument.Tables.Count = 1 Then
For Each borderLoop In ActiveDocument.Tables(s).Borders
With borderLoop
.ColorIndex = wdBlack '將框線設定為黑色。
.LineStyle = wdLineStyleNone '消除原有框線設定。
End With
Next borderLoop
End If
Next s
For s = 1 To i
If ActiveDocument.Tables.Count = 1 Then
Set mytable = ActiveDocument.Tables(s)
mytable.Borders.OutsideLineStyle = wdLineStyleSingle
mytable.Borders.OutsideLineWidth = wdLineWidth150pt '將外部框線設定為1.50pt。
mytable.Borders.InsideLineStyle = wdLineStyleSingle
mytable.Borders.InsideLineWidth = wdLineWidth075pt '將內部框線設定為0.75pt。
mytable.Shading.BackgroundPatternColor = wdColorWhite '將表格網底設定為白色。
End If
Next s
End Sub
-----
親愛的讀者,感謝您耐心閱讀本篇文章。在接近閱讀結束之際,我誠摯邀請您繼續探索更多我之前所撰寫的文章,相信這些內容將為您帶來更多啟發和收穫。在下方,您可以找到一系列豐富多彩的主題,每篇都充滿了精彩的知識和見解。
我深知您抽出寶貴時間閱讀這些文字,對我來說是非常暖心的支持和鼓勵。您的關注是我創作的動力,每一次的閱讀都讓我更有動力將更多的內容呈現給您。
為使我們更靠近,一些交流互動的方式:
❤️點愛表心|💬留言相伴|✏️追蹤大叔|🔗分享此文|☕贊助咖啡
分享至
成為作者繼續創作的動力吧!
從 Google News 追蹤更多 vocus 的最新精選內容從 Google News 追蹤更多 vocus 的最新精選內容

你可能也想看

發表回應

成為會員 後即可發表留言
© 2024 vocus All rights reserved.