AppleScript to Print from Numbers to PDF
I want to use Applescript to automatically save an invoice worksheet to a folder with the invoice number as the file name.
The invoice number is an auto generated number. For the sake of this lets say its in cell A1 of Table 1 on Sheet 1.
This is what I have been able to find so far. Does not work as intended and also unable to figure out how to set the file name or location.
tell application "System Events"
tell process "Numbers"
keystroke "p" using command down
tell sheet 1 of window 1
click menu button "PDF"
repeat until exists menu 1 of menu button "PDF"
delay 0.02
end repeat
click menu item "Save as PDF…" of menu 1 of menu button "PDF"
end tell
end tell
end tell
Any help is greatly appreciated.
Numbers-OTHER