CreateWord

 FUNCTION CreateWord()
   LOCAL oWorkBook
   TRY
   oApp := CREATEOBJECT( "Word.Application" )
   CATCH
   TRY
   oApp := CREATEOBJECT( "Word.Application.11" )
   CATCH
   TRY
   oApp := CREATEOBJECT( "Word.Application.10" )
   CATCH
   TRY
   oApp := CREATEOBJECT( "Word.Application.9" )
   CATCH
   TRY
   oApp := CREATEOBJECT( "Word.Application.8" )
   CATCH
   ALERT( "Word не доступен!" )
   ClearTotRepStatic()
   RETURN .F.
   END
 END
END
END
END
oApp:VISIBLE                       := .F.
oApp:Options:CheckGrammarAsYouType := .F.
oApp:Documents:ADD()
oApp:Options:Overtype := .F.
oAS                   := oApp:SELECTION()
oAS:FONT:NAME         := "Courier New"
oAS:FONT:SIZE         := SelectFont()
nDone := 1
nDoneExcel := 1
RETURN .T.