1

Uses ComObj, ActiveX 


...


procedure TForm1.Button1Click(Sender: TObject); 
var 
   ServerIsRunning : boolean; 
   Unknown : IUnknown; 
   Result : HResult; 
   AppProgID : String; 
   App : Variant; 
begin
//   -
AppProgID:=Word.Application; 
ServerIsRunning := False;
Result := GetActiveObject(ProgIDToClassID(AppProgID),nil,Unknown);
if (Result = MK_E_UNAVAILABLE) then 
//    
pp := CreateOleObject(AppProgID)
 else
  begin
   //     
   App := GetActiveOleObject(AppProgID);
   ServerIsRunning := True;
  end;
  //    
  App.Visible := True;
 //
 //
 //        Office 
 //
 //-
 if not ServerIsRunning then App.Quit;
 App:=Unassigned;
end;