AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi Delphi [FEHLER] PowerPoint mit Delphi ansteuern
Thema durchsuchen
Ansicht
Themen-Optionen

[FEHLER] PowerPoint mit Delphi ansteuern

Ein Thema von T3rm1 · begonnen am 9. Mär 2009 · letzter Beitrag vom 18. Apr 2024
Antwort Antwort
T3rm1

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

Re: [FEHLER] PowerPoint mit Delphi ansteuern

  Alt 9. Mär 2009, 18:02
Ok, also, das Problem lässt sich eingrenzen. Folgender Code lies sich ohne Probleme auf zwei anderen Systemen ausführen (einer Office 11, einer Office 12). Auf meinem System kommt aber nach wie vor der gleiche Fehler:
Delphi-Quellcode:
procedure PPT2Image(Path: string);
var PowerPoint: PowerPointApplication;
  AppWasRunning: Boolean;
  OleResult: HRESULT;
  Unknown: IUnknown;
begin
  AppWasRunning := False;
  OleResult := GetActiveObject(CLASS_PowerPointApplication, nil, Unknown);
  if (OleResult = MK_E_UNAVAILABLE) then
    PowerPoint := CoPowerPointApplication.Create
  else begin
    OleCheck(OleResult);
    OleCheck(Unknown.QueryInterface(PowerPointApplication, PowerPoint));
    AppWasRunning := True;
  end;
  try
    if ExtractFileExt(Path) = '.pptxthen
      PowerPoint.Presentations.Open2007(Path, msoTrue, msoFalse, msoFalse, msoFalse)
    else
    PowerPoint.Presentations.Open(Path, msoTrue, msoFalse, msoFalse);
    PowerPoint.Presentations.Item(1).SaveAs(ExtractFilePath(Path) + 'blub.png', ppSaveAsPNG, msoFalse);
    PowerPoint.Presentations.Item(1).Close;
  finally
    if not AppWasRunning then
      PowerPoint.Quit;
  end;
end;
Hat jemand eine Idee, wo bei meiner Office Installation der Fehler liegen könnte?
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:16 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz