Einzelnen Beitrag anzeigen

T3rm1

Registriert seit: 22. Jan 2007
8 Beiträge
 
Delphi 2009 Professional
 
#5

Re: [FEHLER] PowerPoint mit Delphi ansteuern

  Alt 9. Mär 2009, 17:00
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;
  Mit Zitat antworten Zitat