Add Formatted Text to a Word Document
更新時間:2007年06月15日 00:00:00 作者:
Demonstration script that displays formatted data in a Microsoft Word document.
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "18"
objSelection.TypeText "Network Adapter Report"
objSelection.TypeParagraph()
objSelection.Font.Size = "14"
objSelection.TypeText "" & Date()
objSelection.TypeParagraph()
復制代碼 代碼如下:
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "18"
objSelection.TypeText "Network Adapter Report"
objSelection.TypeParagraph()
objSelection.Font.Size = "14"
objSelection.TypeText "" & Date()
objSelection.TypeParagraph()
相關文章
可視化埋點平臺元素曝光采集intersectionObserver思路實踐
這篇文章主要為大家介紹了可視化埋點平臺元素曝光采集的思路—intersectionObserver的實戰(zhàn)經驗詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2023-01-01CKEditor 4.4.1 添加代碼高亮顯示插件功能教程【使用官方推薦Code Snippet插件】
這篇文章主要介紹了CKEditor 4.4.1 添加代碼高亮顯示插件功能,涉及ckeditor使用官方推薦Code Snippet插件的相關操作布局與使用注意事項,需要的朋友可以參考下2019-06-06js合并數組對象代碼實現(將數組中具有相同屬性對象合并到一起組成一個新數組)
項目過程中經常會遇到JS數組合并的情況,時常為這個糾結,這篇文章主要給大家介紹了關于js合并數組對象(將數組中具有相同屬性對象合并到一起組成一個新數組)的相關資料,需要的朋友可以參考下2024-01-01