I am having trouble in saving an open Excel WorkBook. From the Scrip below it keeps saving the file to the second folder “1 Test” not “TestSave”, The routine opens to the correct Finder Window but saves it in the one before.
--To set the folder path have to step though each Folder to Home
tell application "Finder" to set the target of the front Finder window to folder "TestSave" of folder "1 Test" of folder "DropBox" of home
tell application "Finder"
set currentDir to target of Finder window 1 as alias
end tell
tell application "Microsoft Excel"
activate
save active workbook in currentDir
end tell
This is the output after running the routine.The window that is open is “TestSave” but the file has been saved in the previous folder “1 Test”
Thanks Peter