Quote Originally Posted by Darby View Post
I have used this same basic concept on another project, the only difference is that I included a Textbox to enter a filename to lookup. The app worked as expected, I didn't need to set up for any of the file extensions. When you selected a file, regardless of the extension, it ran it. I went back to the older project, refitted it for the new directory and it runs perfectly. So I'll just copy the code from the older app and rewrite it to fitt the new criteria.

I'm not sure why it wouldn't run as originally written but someday I'll work it out.

Thanks for the reply.
Ok, this
I select a file from the list, I want it to either display the contents of the .pdf and .docx files or run the .exe and .mov files.
was a bit confusing as to whether you wanted to display it embedded on your form or launch the default app for the file type. That is why I asked the question.

jmcilhinney's answer will get you where you want to go.