欢迎来到福编程网,本站提供各种互联网专业知识!

Add Formatted Text to a Word Document

发布时间:2007-06-15 作者: 来源:转载
DemonstrationscriptthatdisplaysformatteddatainaMicrosoftWorddocument.复制代码代码如下:SetobjWord=CreateObject("Word.Application")objWord.Visible=TrueSetobjDoc=objWord.Documents.Add()SetobjSelection=objWord.SelectionobjSelection.Font.Name=
DemonstrationscriptthatdisplaysformatteddatainaMicrosoftWorddocument.
复制代码 代码如下:
SetobjWord=CreateObject("Word.Application")

objWord.Visible=True
SetobjDoc=objWord.Documents.Add()
SetobjSelection=objWord.Selection

objSelection.Font.Name="Arial"
objSelection.Font.Size="18"
objSelection.TypeText"NetworkAdapterReport"
objSelection.TypeParagraph()

objSelection.Font.Size="14"
objSelection.TypeText""&Date()
objSelection.TypeParagraph()



相关推荐