oFormWord = CreateObj ("frmFormWord") oFormWord.Show () Clear Events *============================================================================= Define Class frmFormWord as Form *------ ----- ----------- -- ---- Top = 140 Left = 4 Width = 775 Height = 270 AutoCenter = .T. ShowWindow = 0 WindowType = 1 Caption = "Ole/Word Automation - In-place activation" Add Object cmdQuit as CommandButton with Top = 246 , ; Left = 660 , ; Height = 25 , ; Width = 75 , ; Caption = "\<Quit" Add Object cmdPrint as CommandButton with Top = 246 , ; Left = 550 , ; Height = 25 , ; Width = 75 , ; Caption = "\<Print" Add Object cmdEdit as CommandButton with Top = 246 , ; Left = 440 , ; Height = 25 , ; Width = 75 , ; Caption = "\<Edit" Add Object oleObject as OLEControl with Top = 1 , ; Left = 4 , ; Height = 240 , ; Width = 775 , ; OleClass = "Word.Document" , ; DocumentFile = "C:\TEMP\TESTE.DOC", ; AutoSize = .F. AutoActivate = 0 Procedure cmdQuit.Click * ------- ----- ThisForm.Release EndProc Procedure Activate * -------- EndProc Procedure Init * ---- EndProc Procedure QueryUnload * ----------- This.cmdQuit.Click NoDefault Return .T. EndProc EndDefine