I am forcing my user to run a batch file to run an Excel VBA Application because it is run as a different user that has rights to certain resources that the user doesn't have direct access to.
The batch file is shown below and works great. The only thing I don't like is that because the file is run as a different user, it always asks you to enable macros when you hit excel.
Is there a way to run the Exel in the batch file such that it doesn't ask you to enable macros--that they are forced enabled?
The account I am using to run is a service account. It has no log in privileges. It only has rights to read and write to certain folders.
HERE IS MY BAT FILE:
runas /user:ALLIEDFIT\teammtr /savecred "C:\Program Files (x86)\Microsoft Office\Office15\Excel.exe \"\\afhoufile02\User_Folders\Allied MTRS\Allied MTRS Auto\Z_Dev\_Prod_Push.xlsm\""