Search code examples
excelmacosapplescriptexcel-2008

Block the Excel message "content that is not suported" using AppleScript


I have an Excel 2008 file. This give a warning message when opened. I would like this message not to be displayed.

tell application "Microsoft Excel"  
    open workbook workbook file name "private:var:root:Desktop:XLS FILES:Copy of 
                                   New Microsoft Excel Worksheet (5).xlsx" read only 1
end tell

With the above script the Excel file is opened but the Excel warning still appears:

SO14994693 question example


Solution

  • Try:

    tell application "Microsoft Excel"
        open workbook workbook file name "private:var:root:Desktop:XLS FILES:Copy of New Microsoft Excel Worksheet (5).xlsx" with ignore read only recommended
    end tell