Wrathchild
Technical User
Hi, my application opens other applications and files by using the Runtime.getRuntime().exec command. Everything is working fine; now I'm trying to pass a switch for further functionality.
Example:
I'd like to pass the switch "/t" to an Outlook command to open a template. Currently, without the switch, the template is being embedded within a new email. I've tried many different ways to do this and looked around the net but have been unsuccessful.
Below is the error I keep receiving:
CreateProcess: "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE /t " "\My Folder\IT Mgt Approval.oft" error=3
thanks!
Example:
I'd like to pass the switch "/t" to an Outlook command to open a template. Currently, without the switch, the template is being embedded within a new email. I've tried many different ways to do this and looked around the net but have been unsuccessful.
Below is the error I keep receiving:
CreateProcess: "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE /t " "\My Folder\IT Mgt Approval.oft" error=3
Code:
private static Map myMap = new HashMap();
static {
// store application paths
myMap.put(new Integer(7),
"C:\\Program Files\\Microsoft Office\\OFFICE11\\OUTLOOK.EXE");
}
Code:
{
commands = new String[] {
(String) myMap.get(new Integer(
theMenuConfig.getId())),
theMenuConfig.getPath() };
}
Process child = Runtime.getRuntime().exec(commands);
}
thanks!