Solved

displaying a word document on clicking a menu item

Posted on 2003-11-30
1
186 Views
Last Modified: 2010-03-31
I have 2 documents in word format. In my project (done using swing), i have a menu item named HELP, it has a drop down menu with 2 items. Clicking on each item should display the respective word document.

My question is how can you display a word document (or any text document) upon clicking a drop down menu item.  

Kindly reply.
0
Comment
Question by:kiranms
1 Comment
 
LVL 4

Accepted Solution

by:
Howie_Ly earned 125 total points
ID: 9847972
Attach an event to your Help drop down... then use this

String strURL = new String("c:\\mydoc.doc");
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+strURL);

* assumes you have word installed.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java array passed to SQL where clause 23 63
eclipse argument 14 53
servlet filter example 37 44
expectj telnet failing 5 26
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This video teaches viewers about errors in exception handling.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now