Autor Beitrag
dirkil2
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Di 17.05.05 17:52 
In meiner Applikation nutze ich die Serienbrieffunktion von Microsoft Word. In meiner App möchte ich gerne testen, ob MS Word überhaupt installiert ist.

Bislang ist mir nichts besseres eingefallen, als zu versuchen, ein Connect auf einem TWordApplication Objekt durchzuführen (siehe Code). Leider dauert das einen Moment. Wer hat eine bessere Idee?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
function IsMSWordInstalled : Boolean;
var
  wordApp: TWordApplication;
begin
  try
    try
      wordApp := TWordApplication.Create(nil);
      wordApp.Connect;
      Result := True;
    except
      Result := False;
    end;
  finally
    wordApp.Free;
  end;
end;


Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am Di 17.05.2005 um 22:30
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Di 17.05.05 19:20 
Hi.

Probier es mit den Schweizern
www.swissdelphicente.../showcode.php?id=450

Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
dirkil2 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Di 17.05.05 22:29 
@Ken

Danke für den Hinweis. So klappt es prima!