Registriert seit: 7. Apr 2003
567 Beiträge
Delphi 2006 Enterprise
|
Re: Version abfragen in Word, Excel, Outlook und Access
3. Feb 2004, 13:41
Delphi-Quellcode:
function GetInstalledWordVer: String;
VAR Registry: TRegistry;
TempString: String;
begin
Registry:=TRegistry.Create;
Registry.RootKey:=HKEY_CLASSES_ROOT;
Registry.OpenKey('Word.Application\CurVer',False);
TempString := '';
TRY
TempString :=Registry.ReadString('');
EXCEPT
END;
Result := TXT_KeinWord;
IF LastDelimiter('.',TempString) > 0
THEN
BEGIN
CASE StrToInt(Copy(TempString, LastDelimiter('.',TempString) + 1, Length(TempString))) OF
6: Result := TXT_Word95;
8: Result := TXT_Word97;
9: Result := TXT_Word2k;
10:Result := TXT_WordXP;
11:Result := TXT_Word2003;
ELSE Result := TXT_WordUnbekannt;
END; // CASE
END; // END
Registry.Free;
End; // function GetInstalledWordVer: String;
Schöne Grüße,
Mario Noack
|
|
Zitat
|