Subject Re: Macro for Acrobat Reader and open a file at same time
From Ken Mayer <>
Date Mon, 27 Feb 2023 09:48:03 -0800
Newsgroups dbase.getting-started

On 2/27/2023 9:24 AM, Stuart Tobin wrote:
> I can create a macro with the location of Acrobat Reader. I want to be able to also have that macro open a file whose name I have placed in a variable.
> Reason is different locations and versions of Reader. So Reader location is passed from record to variable to Macro.
> Whole concept: Use listbox to select a .pdf. Then have it opened by Reader through code.
> Can this be done?

If Acrobat Reader is the default (it usually is) for reading a PDF,
you're doing too much work ... ;)

In the dUFLP's "MiscAPI.prg" is a function called "Open_URL" which of
course sounds like it only works for web addresses, but ...

Tested with a PDF on my machine:

set procedure to :dUFLP:MiscAPI
openurl( "C:\SomeFiles\mypdf.pdf" )
close procedure :dUFLP:MiscAPI

Works perfectly ... opens the file in Acrobat Reader, and all is good.


*Ken Mayer*
Ken's dBASE Page:
The dUFLP:
dBASE Books:
dBASE Tutorial:
dBASE Web Tutorial:
dBASE DOS to Windows Tutorial: