Runtime.getRuntime.exec() problem with running Word document
Posted
by Milan
on Stack Overflow
See other posts from Stack Overflow
or by Milan
Published on 2010-03-31T15:29:19Z
Indexed on
2010/03/31
15:33 UTC
Read the original article
Hit count: 352
Hello everybody!
when I write in commandline in windows:
C:\Program Files (x86)\Microsoft Office\Office12>winword.exe /mOpenPage c:\Navod
ilo.doc
It starts the word document with the macro /mOpenPage. I want to do the same thing from Java but its not going.
String[] cmd = {"cmd.exe","/c","start","c:\\Program Files (x86)\\Microsoft Office\\Office12\\WINWORD.exe","/mOpenPage","c:\\Navodilo.doc"};
Process proc = Runtime.getRuntime().exec(cmd);
help?
© Stack Overflow or respective owner