DDE Package failing for Excel
513417Sep 26 2007 — edited Sep 26 2007Hi,
I am trying to open a excel file on application server, this file has vba macro in it.
So all I want to do is open this file so that macro will execute and do rest of processing.
I dont want to show user the opened file so i use DDE.APP_MODE_MINIMIZED.
Following is how i wrote code -
APPID := DDE.APP_BEGIN('C:\Program Files\Microsoft Office\office11\Excel.exe',DDE.APP_MODE_MINIMIZED);
WHILE NOT conv_established LOOP
BEGIN
convid := DDE.INITIATE('excel', 'system');
conv_established := TRUE;
EXCEPTION
WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
conv_established := FALSE;
END;
END LOOP;
DDE.EXECUTE(convid, '[Workbook.Open("c:\temp_dir\Book2.xls")]', 100000);
DDE.TERMINATE(convid);
DDE.APP_END(appid);
But all that i get after this code is -
FRM-40735:WHEN-BUTTON-PRESSED trigger raise unhandled exception ORA-106552
Can anyone please help me in this!
Thanks!
Avinash.
Pune- India.