Hi Paul,
I've run into a few problems with programatically registering an AcxtiveX control and am looking to shellexecute as a possible solution and was wondering if you could help with the syntax.
Using RUN /N RegSvr32 C:\XXX\MyOCX works on some machines but the RUN command fails on others.
using shellexecute works but I am having trouble sending parameters.
TIA
>>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\")
>