作者ptguitar (佩蒂吉他)
看板Office
標題[算表] 寫入word的置中無效?(VBA)
時間Wed Apr 12 10:35:59 2017
軟體:excel
版本:2007以上
我寫了個要寫入word的巨集
我有加入要置中的那一段指令
可是輸出似乎都不會置中
不知道是那邊出錯了?
With WdOb
.Visible = False
.Documents.Add
.Selection.Font.Size = 18
.Selection.Font.Bold = True
.Selection.Font.Name = "標楷體"
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
.Selection.TypeText Text:="xxxxxx統計分析xxxxxxxxxx"
.Selection.TypeParagraph
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
.Selection.TypeText Text:="概況報告"
.
.
.
end with
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.67.77
※ 文章網址: https://www.ptt.cc/bbs/Office/M.1491964562.A.C8F.html
→ soyoso: 抱歉上面連結為出現變數未定義的調整,如並非這方面錯誤的 04/12 11:05
→ ptguitar: 感謝S大 果真這樣就可~~ 04/12 11:40