I want to open Ms-word & load a .doc file when a button clicks from AWT GUI Application.
Actually i want to save my database out put into an ms-word document & open it from Java AWT Application(when a button clicks).
for Generating MSWORD We generated the db output & add html tags and written into File & save this files with .doc extension. this is solve the problem of generating MSWord file & MS-WORD interpreting these files proparly.
But now i want to Open MS-WORD & load the generated file.could you some one please give the solution & also is there any better way to generate ms-word files from java.
OK, so you're already creating files that Word can open. In that case you don't need POI. What happens if you stream the Word file to the browser - does it not cause Word to be opened, or at least the user to be asked what he wants to do with the file?
Ping & DNS - updated with new look and Ping home screen widget
to open word with the file. Executing that line with Runtime.exec should give you the desired result. Of course that only works on Windows...
Not a GUI question, moving to Java in General...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus