Hallo Overclock,
dann Teste mal ob eine MSWord-Instans offen ist.
Delphi-Quellcode:
function TOLEObj.OleObjAktive(strApplicationsName: String): boolean;
var
ClassID: TCLSID;
Unknown: IUnknown;
begin
try
ClassID := ProgIDToClassID(strApplicationsName);
Result := GetActiveObject(ClassID, nil, Unknown) = S_OK;
except
Result := False;
end;
end;
Delphi-Quellcode:
If OleObjAktive('Word.Application') then
ShowMessage('Alles Klar')
else
ShowMessage('Nicht offen')
Word:=GetActiveOleObject('Word.Application');
Bis bald Chemiker
wer gesund ist hat 1000 wünsche wer krank ist nur einen.