当前位置:编程学习 > JS >>

Add Formatted Text to a Word Document

答案: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()



上一个:Add Formatted Data to a Spreadsheet
下一个:jscript之Open an Excel Spreadsheet

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,