Login   /   Register

Add formatted text to a word document

Rate this article
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...
April 1st, 2008 by daniva

Demonstration script that displays formatted data in a Microsoft Word document

Set word = CreateObject( "Word.Application" )
word.Visible = True
Set doc = word.Documents.Add()
Set selection = word.Selection
 
With selection
   .Font.Name = "Arial"
   .Font.Size = "18"
   .TypeText "Network Adapter Report"
   .TypeParagraph()
   .Font.Size = "14"
   .TypeText "" & Date()
   .TypeParagraph()
End With

Posted in MS-Word

Leave a Reply

You must be logged in to post a comment.

This article was viewed 267 times