Shell not opening my .bat file

ShellExecute to open pdf file,but i want to know whether acrobat reader is installed

I used ShellExecute to open .pdf file.

But now i want to know whether AcrobatReader is installed in any system before opening any .pdf file.

Please Help me out
 
I realize this is an old post, but I have some further information for anyone else looking for this in the future.

In my instance I had the same issue with my .bat file running fine from the command prompt, and from explorer, but not running from within my VBA code. I was attempting to run an AWK script to clean, and composite a series of .txt files before importing into a table.

My problem resolution lay within the AWK script. While it ran flawlessly outside of Access, the VBA script would apparently cause it to fail, perhaps a windows limitation when shelling out to run the command? The reason was, that my AWK script was dumping the resultant text file into the local directory, but the batch routine was going out to other locations for data. Once I edited the AWK script to explicitly include the drive and path for the output file, I had no further problems with the VBA script, and it ran fine. It also had no impact on manual execution of the AWK routine, so doesn't interfere with manual running in the future.
 
Perhaps a problem with the version of windows you are using, if you use a 64 bit OS, you may encounter problems with shell command.
 

Users who are viewing this thread

Back
Top Bottom