Antes de chamar Load após o objeto da TActiveX() gostaria de verificar se o Adobe foi instalado. Algo assim:
Código: Selecionar todos
Function testa PDFActivex(oWnd)
MyProgID := ""
if IsActivex( "PDF.PdfCtrl.1" ); MyProgID := "PDF.PdfCtrl.1"; endif
if IsActivex( "PDF.PdfCtrl.2" ); MyProgID := "PDF.PdfCtrl.2"; endif
if IsActivex( "PDF.PdfCtrl.3" ); MyProgID := "PDF.PdfCtrl.3"; endif
if IsActivex( "PDF.PdfCtrl.4" ); MyProgID := "PDF.PdfCtrl.4"; endif
if IsActivex( "PDF.PdfCtrl.5" ); MyProgID := "PDF.PdfCtrl.5"; endif
if IsActivex( "PDF.PdfCtrl.6" ); MyProgID := "PDF.PdfCtrl.6"; endif
if IsActivex( "PDF.PdfCtrl.7" ); MyProgID := "PDF.PdfCtrl.7"; endif
if Empty( MyProgID )
MsgStop( 'No PDF Activex installed' )
return .f.
endif
ActiveX = TActiveX():New( oWnd, MyProgID )
return .t.
