PowerPoint VBA from LC?
richmondmathewson at gmail.com
Sun Aug 7 09:35:27 EDT 2016
Why don't you just do the thing in Visual Basic?
On 08/07/2016 12:35 PM, Peter Reid wrote:
> I have 100+ old PowerPoint PPT files that can't be opened by modern PowerPoint (2007 and later). However I have managed to get a copy of PowerPoint 2003 that can open these old PPTs and save them as new PPTs that can be opened by newer PowerPoint. My problem is the 100+ files that need converting!
> So, I thought I'd write an LC stack that will take a folder of PPTs and feed them into PowerPoint 2003, one at a time, to save them into a new folder in the newer PPT format. I can do the file/folder stuff OK in LC and I intend to use the "Do script as VBscript" or shell(script) to activate PowerPoint and get it to open & save a file at a time.
> My problem is the VBA script needed to open PowerPoint, open a file & then save the file. I've found some code on the LC forums:
> put "set objExcel = GetObject(," & quote & "Excel.Application" & quote & ")" & return into TheScript
> put "objExcel.Application.Run " & quote & "D_Scostamenti.xls!ImportAMC" & quote & ", " & quote & tPath & quote after TheScript
> Do TheScript as "VBScript"
> but I can't see how to save the file and leave PowerPoint active ready for the next file in the sequence. Can anyone help me with this please?
> Peter Reid
> Loughborough, UK
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode