The Script Library
Menu
The Script Library
Browse
Search
Submit
Reference
About
Contact

Link to Us
Index
Display

Home VBScript Microsoft Office Microsoft Word




Add Formatted Text to a Word Document

 

Description
Demonstration script that displays formatted data in a Microsoft Word document.

 

Author/Submitter
Microsoft Scripting Guys

 

Supported Platforms

Windows Server 2003

Yes

Windows XP

Yes

Windows 2000

Yes

Windows NT 4.0

Yes

Windows 98

Yes



 

VBScript Code


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()

Was this helpful? If so, Please Share it by clicking a button on the left the screen..






Search The Library


Search String

Script Language