>oForm = Createobject('myForm') >oForm.Show >Read Events > >Define Class myForm As Form > Height = 500 > Width = 790 > > Add Object wbrowser As OleControl ; > with Height = 450, Width = 790, ; > OleClass = 'Shell.Explorer.2' > Add Object DocSelect As CommandButton ; > with Caption = 'Select DOC',; > Top = 455, AutoSize = .T. > > Add Object AutomateWord As CommandButton ; > with Caption = 'Automate',; > Top = 455, Left=650,AutoSize = .T. > > Procedure AutomateWord.Click > Local oWord > oWord = Thisform.wbrowser.Object.Document.Application > oWord.ActiveDocument.Range.Font.Color = Rgb(0,0,255) > oWord.Selection.Font.Bold = .T. > Endproc > > Procedure wbrowser.Refresh > Nodefault > Endproc > > Procedure DocSelect.Click > Local lcDOC > lcDOC = Getfile('DOC') > If !Empty(lcDOC) > This.Parent.wbrowser.Navigate2('file://'+lcDOC) > Endif > > Procedure QueryUnload > Clear Events > Endproc >Enddefine >>Cetin