I want to make a powerpoint viewer inside of delphi as a feature for one of my projects. All I want is to be able to display the powerpoint inside of the app and cycle through the slides
I have tried a variety of methods such as
const
ppAdvanceOnTime = $00000002;
var
P: OleVariant;
S: OleVariant;
i: Integer;
begin
P := OleContainer1.OleObject.Application.Presentations.Item(1);
// below block would not be necessary for a slide show (i.e. a *.pps)
for i := 1 to P.Slides.Count do begin
P.Slides.Item(i).SlideShowTransition.AdvanceOnTime := True;
P.Slides.Item(i).SlideShowTransition.AdvanceTime := 1;
end;
S := P.SlideShowSettings;
S.AdvanceMode := ppAdvanceOnTime;
S.run;
OleContainer1.OleObject.Application.Presentations.Item(1).SlideShowSettings.Run;
The following code did do what I want but displayed the powerpoint app over the program
Olecontainer1.doVerb(ovShow);