Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> FORMS DDE running a macro
FYI all,
I have seen alot of folks asking about how to run a Macro in excel via
DDE.
/*** start Excel and open c:\wkbkwithmacro.xls in normal mode ***/
AppID := DDE.App_Begin('C:\Program Files\Microsoft
Office\Office\Excel.exe ' ||
c:\wkbkwithmacro.xls,DDE.APP_MODE_NORMAL);
/*** start a conversation with Excel at sheet1 I would normally poke
something in at this point but I am keeping this brief ***/
ConvID := DDE.Initiate('EXCEL', 'sheet1');
/*** run the macro Macro1 ***/
dde.execute(convid,'[run("Macro1")]',1000);
Ok, My only problem with this is that if I have the Macro protection turned on to high or medium it will stop the program and Excel asks me if I want to Enable or Disable running Macro's. It runs fine if you turn Macro protection off but I don't want to do that. Anyone know, in DDE, a way to programmatically Enable Macro's?? Or Is there are VB command I could run to do this?
Thanks,
DM
Received on Thu May 29 2003 - 09:36:15 CDT
![]() |
![]() |