Hello all!!!
I need to when excel file which contains macros is open, Excel don't show "Enable/Disable Macros" dialog. I write next code, but it does't work:
I need to when excel file which contains macros is open, Excel don't show "Enable/Disable Macros" dialog. I write next code, but it does't work:
Code:
on OPEN_EXCEL_FILE(inputPath)
set wbPath to ((POSIX file inputPath) as string)
tell app "Microsoft Excel"
set automation security to msoAutomationSecurityForceDisable
set display alerts to false
set wb to open workbook workbook file name wbPath
return name of wb
end tell
end OPEN_EXCEL_FILE