create new E-Mail in Outlook with runProgram()

Why doesn't it work?

	String cmd = "\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\OUTLOOK.EXE\" /c ipm.note /m \"\"";
  String result = runProgram(cmd);

It works fine, if I do it with the commandline in windows

After executing result is empty.

Are there any mistakes when using quotation marks?

RE: create new E-Mail in Outlook with runProgram()


You are aware that runProgram functions runs this on the server, not on the client?

If that is the case and you really want to open an outlook window on the server you propably need to give the IIS APPPOOL that is running service access to the folder containing the office installation.

Av: David Hollegien 15. dec 2020

RE: create new E-Mail in Outlook with runProgram()

It runs on a terminal server. The outlook window should open in the current user session. You are right, the problem is, that runProgram runs on the server.

Is there a way, to open a new email trough CrmScript and fill in the subject, body and mailto without saving the email in superoffice?

I tried to create a document from a somail template (with variables). Then open it with ajax. It works. But so you create a document every time that is not needed.

Av: profenster Weichsel 15. dec 2020