S
sulemon
Unregistered / Unconfirmed
GUEST, unregistred user!
如题, 我是是在搞不定了, 大家救命啊!
procedure Tscreen.Button1Click(Sender: TObject);
var
PowerPointApp: OLEVariant;
begin
try
PowerPointApp := CreateOleObject('PowerPoint.Application');
except
ShowMessage('Error...');
Exit;
end;
// Make Powerpoint visible
PowerPointApp.Visible := True;
// Open a presentation
PowerPointApp.Presentations.Open('c:/1.ppt');
// Run the presentation
PowerPointApp.ActivePresentation.SlideShowSettings.Run;
PowerPointApp.Run('Update');
end;
我是用这种方法的,但是运行到 PowerPointApp.Run('Update');的时候,
报错:Invalid request.Sub or function not defined,但是Update的确是在ppt的宏里面有的啊
procedure Tscreen.Button1Click(Sender: TObject);
var
PowerPointApp: OLEVariant;
begin
try
PowerPointApp := CreateOleObject('PowerPoint.Application');
except
ShowMessage('Error...');
Exit;
end;
// Make Powerpoint visible
PowerPointApp.Visible := True;
// Open a presentation
PowerPointApp.Presentations.Open('c:/1.ppt');
// Run the presentation
PowerPointApp.ActivePresentation.SlideShowSettings.Run;
PowerPointApp.Run('Update');
end;
我是用这种方法的,但是运行到 PowerPointApp.Run('Update');的时候,
报错:Invalid request.Sub or function not defined,但是Update的确是在ppt的宏里面有的啊