On Jan 10, 2017, at 10:43 PM, Takaaki Naganoya < email@hidden> wrote:
And…Word/Excel 2016 for Mac is sandboxed, too. Does their export command have same problem and not solved yet? Hm…….
For the most part, Word and Excel 2016 also seem to be affected by the problem, though results are inconsistent.
Excel 2016 can access ~/Library/Application Scripts/com.microsoft.Excel/ Word 2016 can access ~/Library/Application Scripts/com.microsoft.Word/
My plan is …once export data from Word/Excel to above location, then move it to the other location (ex.Desktop). How about it?
Good idea on that folder location. Unfortunately, I get a different error when attempting to save there.
So far, the only thing which works reliably for me is Excel’s template folder. Although even that is frustrating as the HFS path doesn’t always include the trailing colon (strangely inconsistent). I haven’t tried POSIX.
This is the most reliable method I have found yet:
tell application id "com.microsoft.Excel" -- Microsoft Excel set templateFolderPath to templates path if templateFolderPath does not end with ":" then set templateFolderPath to templateFolderPath & ":" end if set temporaryFilePath to templateFolderPath & "test.xlsx" save active workbook in temporaryFilePath end tell
I’m open to ideas on any other locations which will work reliably, especially since Word doesn’t have a “templates path” property.
Ray
|