Scalabium Software

SMExport advertising
Knowledge for your independence'.
Home Delphi and C++Builder tips


#143: How can I check if OLE object is installed?

Sometimes in development if you use OLE automation of some object, your application will not work because application is not installed on client computer. For example, you use MS excel automation but MS Excel is not installed.

You can easy check if OLE object is installed and correctly registered using CLSIDFromProgID function (for MS Excel as example only):

var
  ClassID: TCLSID;
  strOLEObject: string;
begin
  strOLEObject := 'Excel.Application';
  if (CLSIDFromProgID(PWideChar(WideString(strOLEObject)), ClassID) = S_OK)
then
  begin
    <application is installed>
  end
  else
  begin
    <application is NOT installed>
  end
end;

In same manner you can check any other required OLE object.


Published: September 25, 2002

See also
 
ABA Spreadsheet Convert
DBISAM Password Recovery
SMDBGrid
ABA Picture Convert
SMReport
ABA Database Convert
ExcelFile Viewer
Paradox to MS Access converter
Viewer for TNEF-files (winmail.dat)
Clarion Viewer
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2025, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport advertising