Autor Beitrag
MKSlayer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

SUse / WinXp / Win 2003 server
Turbo Delphi / Borland Builder 4
BeitragVerfasst: Mi 09.07.08 11:55 
Ich möchte gern über delphi PowerPoint öffnen und eine bestehende Präsentation laden

Ich bin mitlhrweile so weit das ich das powerPoint aufbekommen aber wenn ich die Funktion zum laden benutzen will kommt immer eine Fehlermeldung

"OpenFileName wird von Automatiesierungsprogramm nicht Unterstütz"


Quelltext

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.Button2Click(Sender: TObject);
begin
    PowerPoint := CreateOleObject('PowerPoint.Application');
    PowerPoint.Visible := True;
    //pres:=PowerPoint.Presentations.Add(True); mit und ohne der Zeile trotrzdem der Fehler
    PowerPoint.Presentations.OpenFileName:='P:\Bildschirm Eingang.ppt';
end;
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mi 09.07.08 12:29 
Mit der Automation von Powerpoint kenne ich mit nicht aus, aber bei den anderen Officeprodukten heisst die Methode .Add(). Schau die mal die VBA-Hilfe an oder lass dir den Vorgang als Makro aufzeichnen.

_________________
Markus Kinzler.
MKSlayer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

SUse / WinXp / Win 2003 server
Turbo Delphi / Borland Builder 4
BeitragVerfasst: Mi 09.07.08 12:45 
ja das mit dem macra habe ich ja gemacht deswegen bin ich ja auf den quelltext gekommen aber im makro ist nur ein unterschied in der zeile


in Makro

Presentations.Open FileName:="P:\Bildschirm Eingang.ppt", ReadOnly:=msoFalse

bei mir

PowerPoint.Presentations.Open.FileName('P:\Bildschirm Eingang.ppt', ReadOnly:=msoFalse);

jetzt habe ich nur noch Probleme mit dem Parametern ReadOnly:=msoFalse wo und wie muss ich das vorher deklarieren
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mi 09.07.08 12:48 
FileNmae ist aber keine Methode, sondern ein named Parameter.

Versuch mal
ausblenden Delphi-Quelltext
1:
PowerPoint.Presentations.Open('P:\Bildschirm Eingang.ppt', False);					

_________________
Markus Kinzler.
MKSlayer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

SUse / WinXp / Win 2003 server
Turbo Delphi / Borland Builder 4
BeitragVerfasst: Mi 09.07.08 12:54 
Ah Ok

Danke schön jetzt funz alles bestens