Are you aware that even if this is valid code, it will be executed on the server (mid tier) and not the user's machine? This may be where you are having a problem. On the server side, this would fail if you are starting the Oracle software (e.g. WLS, etc) with a Windows Service. This is because Windows prevents Service started processes from having access to the Desktop space. Because Acrobat requires access to the Desktop (as far as I know), the process may start but not be able to successfully complete the expected task.
thank you for this useful information. I was confused because it seemed the Acrobat session did start on the Client (APP_BEGIN) and I thought the first DDE command was at least successful but I forgot that
Webutil has not Client_DDE and therefore could not handle this on Clientsite
I found even an the explantion from Mr. Webutil for this:
Question to Duncan Mills 05-2004:
Does webutil have any DDE related functionality?
DM> No, this was something that we did not have time to put in
I made the test on a Windows2012 Server, installed a local printer and got a result with a DDE.APP_BEGIN.
This piece of code opens once two Acrobat processes and then no more. So if you can put your PDF Reports somewhere accessible on the Server you can use this call to direct print it on the local Printer of the W2012 Server.
It is really fast, you do not need to kill Client-Tasks and it seems to work with mass calls. It works with every Acrobat Reader so no license needed. Maybe a solution to print out bills or other secure Papers on a single place.
/* Begin trigger DDE sample */
/* Start Acrobat */
/* This line assumes that Acrobat is installed on the Windows2012 Server - the path can be found in the Registry [HKEY_CLASSES_ROOT\acrobat\shell\open\command] */
APPID := DDE.APP_BEGIN('"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /t "C:\temp\test1.pdf"',DDE.APP_MODE_MINIMIZED);
APPID := DDE.APP_BEGIN('"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /t "C:\temp\test2.pdf"',DDE.APP_MODE_MINIMIZED);
APPID := DDE.APP_BEGIN('"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /t "C:\temp\test3.pdf"',DDE.APP_MODE_MINIMIZED);
/* Handle exceptions */
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('WINDOWS APPLICATION CANNOT START.');
WHEN DDE.DMLERR_NOTPROCESSED THEN
MESSAGE('A TRANSACTION FAILED');
/* End of trigger */
But I was still not able to establish a DDE Server Connection on a Windows2012 Server with Acrobat.