08-28-2012 05:50 AM
With the following code, I am opening Excel, opening a specific file and running a macro in that file. The only problem is that between opening the specific file and running the macro it contains, Excel pops up with the prompt that asks me if I want to run the file with or without macros, and I have to manually choose "With macros" before my SAS program continues. Can I get SAS to either ignore this prompt or to automatically choose "With macros"?
Edit: By the way, I would like my code to be able to run on other people's computers as well, so the solution where I turn off the prompt in Excel is a last way out.
START OF CODE.
x ' "C:\Program Files\Microsoft Office\OFFICE11\excel.exe" ';
filename EXCEL DDE 'EXCEL|SYSTEM';
x = sleep(3);
END OF CODE.
08-29-2012 09:22 AM
This is a tough one. I think that message is present (or suppressed) based on a registry setting in Windows. If the users have a certain amount of administrative access to their own computers, you could use any one of the registry editing programs to set up a small executable to modify the registry. If not, your network admins would have to do it with their tools.