Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Acrobat OLE automation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00625352
Message ID:
00625458
Vues:
14
Hi Paul,

The guiding doesn't get better than that!
Thanks

Ashley


>>Hi,
>>
>>Can anyone guide me Acrobat automation from VFP?
>>I am trying to have a pdf document opened in Acrobat, with a test for failure is Acrobat is not installed.
>>
>>TIA
>
>You should be able to test to see if Acrobat is installed using this code:
>
>
>#DEFINE HKEY_CLASSES_ROOT -2147483648
>
>loRegistry = NewObject('Registry', HOME() + 'FFC\Registry.vcx')
>lcValue = ''
>
>lcClassID = '{CA8A9780-280D-11CF-A24D-444553540000}'
>loRegistry.GetRegKey('', @lcValue, ;
>                     'CLSID\' + lcClassID + '\InProcServer32', ;
>                     HKEY_CLASSES_ROOT)
>IF EMPTY(lcValue)
>   * It isn't registered, it must not be installed
>
>   MESSAGEBOX("Not Registered")
>ELSE
>   MESSAGEBOX("Registered!")
>ENDIF
>
>
> This code actually checks to see if the PDF ActiveX control is installed (which happens when you install Acrobat), so it should work OK.
>
>If you just need to launch the PDF (ie. don't need control over Acrobat, just need to view them), you can use:
>
>
>loShell = NewObject("_ShellExecute", HOME() + "FFC\_environ.vcx")
>loShell.ShellExecute("NameOfPDF.PDF", "C:\DirectoryWherePDFExists\")
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform