applescript-excel

AppleScriptTask throwing an error 5 - invalid procedure call or argument

南笙酒味 提交于 2019-12-22 14:59:51
问题 I'm facing a problem on Mac 2016 Powerpoint. In my VBA module I need to run an applescript. As we cannot use MacScript anymore I followed RonDeBruin's explanation to use AppleScriptTask. My Applescript is working fine on his own but when I try to call it like this : AppleScriptTask("hello.scpt", "myhandler", "hello") With in my apple script on myhandler(paramString) say paramString End myhandler It gives me an error 5 - Invalid procedure call or argument my script is placed in Library

AppleScript to combine multiple Excel files into a single worksheet

隐身守侯 提交于 2019-12-20 06:32:09
问题 I am not an expert in AppleScript, so I've ben trying to find an example of AppleScript code that can successfully process a batch of Excel files (each one with a single worksheet), copying the content of each one into a single destination sheet. This is the pseudo code that I had in mind: pick source folder with Excel files; pick destination Excel file; for each file within the source folder: copy data from default sheet; paste data into destination sheet's first unused row end This is the

Applescript: Open Excel File and Save in a Different Format (same name and path)

↘锁芯ラ 提交于 2019-12-13 07:07:08
问题 I have a folder of .xls files of which some are genuine excel files and some are excel xml files (but still with the .xls extension). To work with the files in a separate program, I'm trying to convert them all to a consistent format (Excel 98-2004) and want to use an applescript to do this while retaining the original file names and directory structure. As of now, I have a working loop and list of files, and am accomplishing everything but the save function: set file_Name to "/Users/me/path

AppleScript: set Microsoft Excel cell's background color

此生再无相见时 提交于 2019-12-11 01:56:31
问题 Using AppleScript, how can I change the background color of "cells ranging from A3 to E3" to light grey? I still want the font to be in black. 回答1: Two caveats with this answer: You didn't specify which version of Excel, and the following was tested in v2004. tell application "Microsoft Excel" set theRange to range "A3:E3" set interiorObject to interior object of theRange set color index of interiorObject to 5 -- '5' is only a dummy value; change as needed. end tell Per the dictionary, color

AppleScriptTask throwing an error 5 - invalid procedure call or argument

旧街凉风 提交于 2019-12-06 06:22:00
I'm facing a problem on Mac 2016 Powerpoint. In my VBA module I need to run an applescript. As we cannot use MacScript anymore I followed RonDeBruin's explanation to use AppleScriptTask. My Applescript is working fine on his own but when I try to call it like this : AppleScriptTask("hello.scpt", "myhandler", "hello") With in my apple script on myhandler(paramString) say paramString End myhandler It gives me an error 5 - Invalid procedure call or argument my script is placed in Library/Application Scripts/com.microsoft.Powerpoint is this path alright? Thank you for your help I did get that

AppleScript to combine multiple Excel files into a single worksheet

痞子三分冷 提交于 2019-12-02 08:32:57
I am not an expert in AppleScript, so I've ben trying to find an example of AppleScript code that can successfully process a batch of Excel files (each one with a single worksheet), copying the content of each one into a single destination sheet. This is the pseudo code that I had in mind: pick source folder with Excel files; pick destination Excel file; for each file within the source folder: copy data from default sheet; paste data into destination sheet's first unused row end This is the code I came up with. It does open correctly each file, but the copy/past operation is just not happening

Applescript Excel 2016 save as PDF

我们两清 提交于 2019-12-02 04:27:06
问题 I am trying to save an Excel 2016 spreadsheet as a PDF file. I have following simple Applescript that is called from within an Objective C program: on saveExcelAsPDF(documentPath, PDFPath) tell application "Microsoft Excel" open file documentPath save active sheet in PDFPath as PDF file format close active workbook saving no quit end tell end saveExcelAsPDF This script works great using Excel 2008 and 2011, but fails using Excel 2016 (version 15.22). Both the open and save commands fail in

Applescript Excel 2016 save as PDF

China☆狼群 提交于 2019-12-02 01:58:51
I am trying to save an Excel 2016 spreadsheet as a PDF file. I have following simple Applescript that is called from within an Objective C program: on saveExcelAsPDF(documentPath, PDFPath) tell application "Microsoft Excel" open file documentPath save active sheet in PDFPath as PDF file format close active workbook saving no quit end tell end saveExcelAsPDF This script works great using Excel 2008 and 2011, but fails using Excel 2016 (version 15.22). Both the open and save commands fail in different ways. Can someone please help me! I have spent hours trying to get this to work. I have read

Save embedded Word Doc as PDF

强颜欢笑 提交于 2019-11-30 19:27:47
SCENARIO A word document is embedded in Excel 2011 file. I need to save it as a pdf. Had it been Excel 2010 then it wouldn't have been a problem as MS-Office in Win Pcs support OLE automation. WHAT HAVE I TRIED? This is the code that I tried in Excel 2010 which works. Option Explicit Sub Sample() Application.ScreenUpdating = False Dim shp As Shape Dim objWord As Object Dim objOLE As OLEObject Set shp = Sheets("Sheet1").Shapes("Object 1") shp.OLEFormat.Activate Set objOLE = shp.OLEFormat.Object Set objWord = objOLE.Object objWord.ExportAsFixedFormat OutputFileName:= _ "C:\Users\Siddharth Rout

Save embedded Word Doc as PDF

◇◆丶佛笑我妖孽 提交于 2019-11-30 03:12:53
问题 SCENARIO A word document is embedded in Excel 2011 file. I need to save it as a pdf. Had it been Excel 2010 then it wouldn't have been a problem as MS-Office in Win Pcs support OLE automation. WHAT HAVE I TRIED? This is the code that I tried in Excel 2010 which works. Option Explicit Sub Sample() Application.ScreenUpdating = False Dim shp As Shape Dim objWord As Object Dim objOLE As OLEObject Set shp = Sheets("Sheet1").Shapes("Object 1") shp.OLEFormat.Activate Set objOLE = shp.OLEFormat