Note that there are some explanatory texts on larger screens.

plurals
  1. POhave java open an oft then attach a file
    primarykey
    data
    text
    <p>I have been trying to read as much on stackoverflow about this as possible, but I need to open an outlook offline template (.oft) file. Then have a file attached to it. I will put the command into a java application.</p> <p>I would use a command line switch, but it creates a new message with the attachment and opens the oft file, it's not attaching it to the .oft.</p> <pre><code>"C:\Program Files (x86)\Microsoft Office\Office14\Outlook.exe" /f "C:\RSASoftToken\android.msg" /a "C:\RSASoftToken\android\WMH7.sdtid" </code></pre> <p>If there is a way to get command line to work, that would be the easiest. If not what else can I do in java?</p> <p>I need to add it to this code</p> <pre><code> //the New File Name String newFileName = Prefix + fileName.substring(0,4) + Suffix + fileExtension; String tentativeName = "new Filename will be -&gt;"+newFileName+"\n"; System.out.println(tentativeName); if(cbxAndroid.isSelected() == true ){ try { Runtime rt = Runtime.getRuntime(); Process pr = rt.exec("cmd /c \\RSASoftToken\\TokenConverter.exe \\RSASoftToken\\android\\"+newFileName+" -android -o \\RSASoftToken\\android\\"+newFileName.substring(0,4)+".txt"); BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream())); String line=null; while((line=input.readLine()) != null) { System.out.println(line); } int exitVal = pr.waitFor(); System.out.println("Exited with error code "+exitVal); } catch(Exception e) { System.out.println(e.toString()); e.printStackTrace(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload