I am finding that the final save step is not working. I am trying to create a script I can use to save an entire Excel Document (not a single sheet) as a PDF. Since this post is quite recent & directly applies I wanted to insert myself into the conversation.
Set theItems to text items of TheBigString Set text item delimiters to fieldSeparator On SplitString(TheBigString, fieldSeparator) SaveEXCELSheetasPDF('~/Desktop/MyReportpdf.PDF MySheetName') Credits: Late Night Software Have the EXCEL Sheet you want to print already open in EXCEL, and rename the paths To test how this script works, simple comment this out and update the parameters. RunMyScript = AppleScriptTask(“SAVEEXCELSHEETASPDF.scpt”, SaveEXCELSheetasPDF', “~/Desktop/MyReportpdf.PDF MySheetName”) Source: How to print to PDF a sheet in EXCEL Office 2016 that contains charts/images? Save this script file in /Users//Library/Application Scripts/ How do you tell what sheet to print? In the example below, I just want to print “MySheetName”. Given that the script will be run from VBA using AppleScriptTask, how would the script look like?
Thanks Ed, This is close to what’s needed.