home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "EXAMPLE 2"
- ClientHeight = 1008
- ClientLeft = 1092
- ClientTop = 1512
- ClientWidth = 3324
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1008
- ScaleWidth = 3324
- Begin VB.CommandButton cmdCreate
- Caption = "&Create Word Document"
- Height = 495
- Left = 360
- TabIndex = 0
- Top = 240
- Width = 2415
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdCreate_Click()
- Dim objWord As Object
- Set objWord = CreateObject("Word.Basic")
- objWord.FileNewDefault
- objWord.Insert "I can resist anything."
- objWord.Wordleft
- objWord.Bold
- objWord.Insert ", except temptation"
- objWord.FilePrint 'Make sure your printer is on
- objWord.FileSaveAs App.Path & "\QUOTE.DOC"
- objWord.FileClose
- Set objWord = Nothing
- End Sub
-