Hi
Sorry if this is a stupid question but how do I print a sheadsheet in Excel (Office 365) ?
I’ve tried the following
tell application "Microsoft Excel"
activate
print window 1 with print dialog
print workbook 1 with print dialog
print sheet 1 with print dialog
end tell
all of which does nothing…
Thanks
Tim
Hi.
I don’t know about Excel, but in most applications, you print a document or a file or a list of documents or files.
Thanks Nigel
The script I pasted was part of a larger script which creates the spreadsheet on the fly then discards it without saving. So no file exists, only what is on the screen.
It worked fine with Excel 2008 but stopped working when we upgraded.
Thanks
Tim
Solved problem by using System Events to keystroke the printing of the spreadsheet.
Bit of a hack job but it works.
Thanks