Hab ich schon versucht. Gleicher Fehler!
Delphi-Quellcode:
procedure PPT2Image2(Path: string);
var
PowerPointApp: OLEVariant;
begin
try
PowerPointApp := CreateOleObject('PowerPoint.Application');
except
ShowMessage('Error...');
Exit;
end;
// Make Powerpoint visible
PowerPointApp.Visible := True;
// Show powerpoint version
ShowMessage(Format('Powerpoint version: %s',[PowerPointApp.Version]));
// Open a presentation
PowerPointApp.Presentations.Open(path, False, False, True);
// Show number of slides
ShowMessage(Format('%s slides.',[PowerPointApp.ActivePresentation.Slides.Count]));
// Close Powerpoint
PowerPointApp.Quit;
// PowerPointApp := unassigned;
end;