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

【WORD VBA】自動插入底稿頁尾

Sub 自動插入底稿頁尾()
Dim mytable As table
With ActiveDocument
Set mytable = .Tables.Add(.Sections(1).Footers(wdHeaderFooterPrimary).range, 2, 4)
End With
With mytable
.Cell(1, 1).range.Text = "XX"
.Cell(1, 1).range.font.Size = 12
.Cell(1, 1).range.font.Name = "標楷體"
With mytable.Cell(1, 1).range
.ParagraphFormat.Alignment = Word.WdHorizontalLineAlignment.wdHorizontalLineAlignCenter '水平置中
End With
.Cell(1, 2).range.Text = "XX"
.Cell(1, 2).range.font.Size = 12
.Cell(1, 2).range.font.Name = "標楷體"
With mytable.Cell(1, 2).range
.ParagraphFormat.Alignment = Word.WdHorizontalLineAlignment.wdHorizontalLineAlignCenter '水平置中
End With
.Cell(1, 4).range.Text = "XX"
.Cell(1, 4).range.font.Size = 12
.Cell(1, 4).range.font.Name = "標楷體"
With mytable.Cell(1, 4).range
.ParagraphFormat.Alignment = Word.WdHorizontalLineAlignment.wdHorizontalLineAlignCenter '水平置中
End With
.Cell(2, 4).range.Text = "XX(/)"
.Cell(2, 4).range.font.Size = 12
.Cell(2, 4).range.font.Name = "times new romans"
With mytable.Cell(2, 4).range
.ParagraphFormat.Alignment = Word.WdHorizontalLineAlignment.wdHorizontalLineAlignCenter '水平置中
End With
Set mytable = ActiveDocument.Tables(1)
mytable.Borders.InsideLineStyle = wdLineStyleDot
mytable.Borders.InsideLineWidth = wdLineWidth075pt '將內部框線設定為0.75pt。
mytable.Borders.OutsideLineStyle = wdLineStyleSingle
mytable.Borders.OutsideLineWidth = wdLineWidth150pt '將外部框線設定為1.50pt。
mytable.Shading.BackgroundPatternColor = wdColorWhite '將表格網底設定為白色。
End With
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers.Add
End Sub
-----
親愛的讀者,感謝您耐心閱讀本篇文章。在接近閱讀結束之際,我誠摯邀請您繼續探索更多我之前所撰寫的文章,相信這些內容將為您帶來更多啟發和收穫。在下方,您可以找到一系列豐富多彩的主題,每篇都充滿了精彩的知識和見解。
我深知您抽出寶貴時間閱讀這些文字,對我來說是非常暖心的支持和鼓勵。您的關注是我創作的動力,每一次的閱讀都讓我更有動力將更多的內容呈現給您。
為使我們更靠近,一些交流互動的方式:
❤️點愛表心|💬留言相伴|✏️追蹤大叔|🔗分享此文|☕贊助咖啡
分享至
成為作者繼續創作的動力吧!
投行大叔碎碎念是一個以分享業內觀點和實際工作狀況為主題的專欄。希望透過投行大叔碎碎念,你可以獲得寶貴的行業內幕,了解投資銀行的實際運作方式和挑戰。這個網站提供了深入的分析和洞察力,涵蓋了企業融資、併購和重組、資本市場交易等各個方面。這些業內觀點和實際案例將幫助你更好地理解投資銀行業務,從而在自己的工作中更具競爭力。
從 Google News 追蹤更多 vocus 的最新精選內容從 Google News 追蹤更多 vocus 的最新精選內容

投行大叔想告訴你的一些事 的其他內容

發表回應

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