06-22-2015 09:34 AM
VB for Applications is a programming environment within the office application. DDE is a connector with which you can send code into an open Office Component. You should be able to do the same in EG, though I don't use it.
I would however question why you would want to do this. If a VBA macro needs to be run, set it to run On_Open, that way it will be run once the file is opened, rather than the need to push it to do it immediately. Otherwise a more complete image of what you are trying to achieve is needed.
06-22-2015 10:11 AM
You cannot use DDE from EG (which connects to "headless" SAS sessions), since DDE relies on Windows messages and requires the SAS session to run in a windowing environment (and on the same machine as the process it is communicating with).
However, you can run VBSCript from EG if X commands are allowed on your server. For example:
/* write the vbs file */
put "Set objFSO=CreateObject(""Scripting.FileSystemObject"")";
put "Set objFile = objFSO.CreateTextFile(outFile,True)";
put "objFile.Write ""test string"" & vbCrLf";
/* execute the vbs file */