November 21st, 2012, 10:37 AM
find the executable application for a file
I have been trying to find code examples that would help to find the users' version of adobe reader that is on their machine. I have a file attachment form that any user can add attached files and other users can view. The problem is that when a user browse for a file and it is a .pdf it records the version of adobe from that individual. Now the problem I am getting is when another individual who trys to open that file and has an other version of adobe they are unable to open it.
What I need help with is to use VB to determine the version and the path to their copy of adobe and use it to open the file. I have found some code examples that will search the registry for adobe and return the path. That seemed like a good way about approaching it but I was not able to get it to work. Another idea would be to find the executable for a .pdf file.
Any ideas would be appreciated
November 21st, 2012, 06:40 PM
Why wouldn't it work - error message, wrong results, nothing happend?
Want to provide link to the code example?
This one seems to work: http://www.vbaexpress.com/forum/showthread.php?t=29533
I had to comment out:
sOpenCommand = Mid(sOpenCommand, 2, Len(sOpenCommand) - 2)
I tested with .docx and .pdf files.
The .docx file opened in Word but the app is minimized to Taskbar. The .pdf file tries to open, but errors 'can't find file', I click ok and the pdf opens minimzed in another instance of Adobe. So now have two instances of the Adobe app open. Weird.
Last edited by June7; November 21st, 2012 at 07:35 PM.