Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adobe Acrobat document
Message
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00794952
Message ID:
00795041
Views:
22
You're welcome.
There's typo in my code. It should read
CASE lnresult <= 32
	* Some other error
because the value less than or equal to 32 represents an error

>Hi Sergey,
>
>I will give it a try.
>
>Thank you again for all your help.
>
>Regards...Rex
>
>>Hi Rex,
>>
>>You can use FindExecutable Win API to get program associated with PDF files and act accordingly.
DECLARE INTEGER FindExecutable IN Shell32;
>>  STRING lpFile, STRING lpDirectory, STRING @lpResult
>>
>>lcfile = ADDBS(SYS(2023)) + SYS(2015) + ".PDF"
>>STRTOFILE("TEMP FILE", lcfile)
>>lcbuffer = SPACE(200)
>>lnresult = FindExecutable(lcfile, "", @lcbuffer)
>>ERASE (lcfile )
>>lcExe = ""
>>DO CASE
>>CASE lnresult = 31
>>	* No program is associated with PDF files	
>>CASE lnresult < 32
>>	* Some other error
>>OTHERWISE	
>>	* Extract executable associated with PDF file
>>	lcExe = LEFT(lcBuffer, RAT(CHR(0), lcbuffer )-1)
>>ENDCASE
>>? lcExe
>>
>>>Hi Sergey,
>>>
>>>Thank you most sincerely. What you sent me works perfectly!!
>>>
>>>In case my user doesn't have Adobe Acrobat Reader on their system, will you please advise me if you know of a way of checking if the reader is loaded onto the users machine?
>>>
>>>Regards...Rex
>>>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform