A way to open a Word document or a Visio diagram, etc

I am aware of the system.util.execute function. But have you tried to make a button labeled ‘Help’ that a user can click and will open a Word document in a shared folder on a server, for instance? It is doable if you know the exact location of the user’s Microsoft Office folder that contains the WINWORD.EXE executable so you can call that and pass it the location of the document as an argument. But user A may have Office 2007, and user B has Office 2010, and user C has Office 2003, etc. WINWORD.EXE is not always in the same exact location, so the button won’t always work.

In C# programming, there is a way to just enter the complete path to the document, and it will find the program associated with that type document on that computer and open it in that application. Surely the same ability exists in Java, eh? <-- No, I’m not Canadian, but I like using that word. Let’s have another beer, eh?

If there is another way to do this, I’m all ears. Yes, I know you can convert the doc to a PDF and use the PDF viewer, but this document changes very often, and the PDF viewer on a project set to 1024x 768 window size makes the pages very small and almost unreadable.

You should be able to use system.net.openURL along with the file:/// qualifier to open up any file local to the client:


Windows will auto-associate and open the appropriate program.

Thanks for that info, adamaustin. I am not much of the web type programmer, so I didn’t think the system.net functions would have a way to open a Windows document like that. You live, you learn. I created a button to open a help document on a network server and Word opened up and loded the document with no problem. I appreciate the help.

Please consider this feature request nullified.