Hi
I’m trying to save a new workbook to a folder on desktop
set destinationPath to " :Users:bestbuy:Desktop & BC_TEST"
tell application "Microsoft Excel"
activate
set newBook to make new workbook
set column width of range "A:AZZ" to 5 -- characters (columns)
save newBook as newBook in destinationPath
close active workbook saving yes
end tell
My event log comes up with
tell application "Microsoft Excel"
activate
make new workbook
workbook "Sheet25"
set column width of range "A:AZZ" to 5
save workbook "Sheet25" as workbook "Sheet25" in " :Users:bestbuy:Desktop & BC_TEST"
close active workbook saving yes
end tell
But the workbook is not there, or anywhere I’ve looked.
any ideas
thanks
bills
Model: macbook08
AppleScript: 2.2.1
Browser: Safari 525.27.1
Operating System: Mac OS X (10.5)
set folderPath to "Macintosh HD:Users:merickson:Desktop:myFolder:"
tell application "Microsoft Excel"
set newWorkbook to make new workbook
set column width of (range "A:IV") to 5
save workbook as newWorkbook filename (folderPath & (name of newWorkbook) & ".xls")
close active workbook
end tell
Assuming a new document is always Untitled.ext then you may as well use:
set folderPath to “Macintosh HD:Users:merickson:Desktop:myFolder:”
tell application "Microsoft Excel"
set column width of (range "A:IV") to 5
save workbook as newWorkbook filename (folderPath & "Untitled.xls")
close active workbook
end tell