AppleScript to Save Excel Chart as PNG Broken after Recent Update I've been using this code as part of a larger script for the last year. Yesterday I upgraded Excel to Version 16.10 (180210) and I keep getting an Parameter error -50, which I've previously associated with permissions to access a particular file or folder. As suggested in some other articles I've seen, I have Excel alias the path, but that no longer seems to be working. Any suggestions?

Here's the code:

tell application "Finder" to set pth to container of (path to me) as text 
set {wb, ws, chartName} to {"testChart.xlsx", "charts", "spend"}
set fn to pth &amp; chartName &amp; ".png"

tell application "Microsoft Excel"
    alias pth
    alias fn
    tell workbook wb to tell worksheet ws
        try
            save as picture chart object chartName picture type save as PNG file file name fn
        on error errMsg number errNum
            log errMsg
            log errNum
        end try
    end tell
end tell
I'm posting the resolution here with the hope that it will help others not waste their time as I have over the last few days. It turns out that saving a chart as an image via automation (both AppleScript and VBA) is broken in Excel 16.10 and 16.11. I had to revert to Excel 15.41, and now the code is working again.