Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thdbguy

macrumors newbie
Original poster
Mar 13, 2022
1
0
Does anyone have a prepared AppleScript or OS X ready macro to pull data from Excel and automate slide creation in PowerPoint? Simple PowerPoint slides, pulling from the first two columns in Excel into two text boxes via a master slide, new slide for each respective row. Obviously the macro I have to do this on PC doesn't directly translate across platforms, and my attempts to rewrite and debug in VBE have been shoddy.

I'm a novice programmer, working through this problem out of necessity to make my live entertainment job a little easier. 2020 Apple M1, macOS Monterey 12.2, Microsoft PowerPoint // Excel 2021.

I found the below for Apple Numbers // Keynote ... but even it throws errors. Open to workarounds, but trying to stick with the MS Office suite.


var Numbers = Application("Numbers");
var Keynote = Application("Keynote");

var table = Numbers.documents[0].sheets[0].tables[0];
var presentation = Keynote.documents[0];
var slideMaster = presentation.masterSlides["Title & Subtitle"];

for(var i=1;i<table.rowCount();i++) {
var newSlide = Keynote.Slide({baseSlide:slideMaster});
presentation.slides.push(newSlide);
newSlide.defaultTitleItem().objectText = table.rows.cells[0].value();

var newSlide = Keynote.Slide({baseSlide:slideMaster});
presentation.slides.push(newSlide);
newSlide.defaultTitleItem().objectText = table.rows.cells[0].value();
newSlide.defaultBodyItem().objectText = table.rows.cells[1].value();
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.