这么打开的:
PowerPointApplication1.Visible := 1;
PowerPointApplication1.AutoQuit:=true;
try
PowerPointApplication1.Presentations.Open(Filename,0,1,1);
except
MessageBoxEx(self.Handle,pchar(Filename+' 打不开!'),'提示:',MB_ICONWARNING,LANG_CHINESE);
PowerPointApplication1.Disconnect;
exit;
end;
with PowerPointApplication1.Presentations.Item(1) do
begin
SlideShowSettings.AdvanceMode := ppSlideShowUseSlideTimings;
SlideShowSettings.LoopUntilStopped := 1;
ssWin := SlideShowSettings.Run;
ssWin.View.First;
end;
PowerPointApplication1.Visible := 1;
PowerPointApplication1.AutoQuit:=true;
try
PowerPointApplication1.Presentations.Open(Filename,0,1,1);
except
MessageBoxEx(self.Handle,pchar(Filename+' 打不开!'),'提示:',MB_ICONWARNING,LANG_CHINESE);
PowerPointApplication1.Disconnect;
exit;
end;
with PowerPointApplication1.Presentations.Item(1) do
begin
SlideShowSettings.AdvanceMode := ppSlideShowUseSlideTimings;
SlideShowSettings.LoopUntilStopped := 1;
ssWin := SlideShowSettings.Run;
ssWin.View.First;
end;
procedure TForm1.PowerPointApplication1SlideShowBegin(Sender: TObject;
var Wn: OleVariant);
begin
I := 0;
end;procedure TForm1.PowerPointApplication1SlideShowNextSlide(Sender: TObject;
var Wn: OleVariant);
begin
Inc(I);
end;————————————————————————————————————
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
————————————————————————————————————