• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Launch MS Word from an applet

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic