• Post Reply Bookmark Topic Watch Topic
  • New Topic

Launch MS Word from an applet

 
Seb Castiaux
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
what is the exact command to open a file in MS Word from an applet?
Thanks a lot,
S�bastien
 
Stanley Smith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there... assuming that the executable path to Word is as i recorded... and the file name is MYFILE.doc you could use the following.
String[] cmdArray = new String[2];
cmdArray[0] = "c:\\Program Files\\Microsoft Office\\Office10\\winword.exe";
cmdArray[1] = "c:\\My Documents\\MYFILE.doc";
try {
Runtime.getRuntime().exec(cmdArray);
} catch (Exception exc) {}
Hope this helps!
Robin
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!