[算表] 寫入word的置中無效?(VBA)

看板Office作者 (佩蒂吉他)時間7年前 (2017/04/12 10:36), 編輯推噓0(004)
留言4則, 2人參與, 最新討論串1/1
軟體: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

04/12 10:47, , 1F
調整為這樣https://i.imgur.com/vsFjCy3試試
04/12 10:47, 1F

04/12 11:05, , 2F
抱歉上面連結為出現變數未定義的調整,如並非這方面錯誤的
04/12 11:05, 2F

04/12 11:05, , 3F
04/12 11:05, 3F

04/12 11:40, , 4F
感謝S大 果真這樣就可~~
04/12 11:40, 4F
文章代碼(AID): #1OxPAIoF (Office)
文章代碼(AID): #1OxPAIoF (Office)