procedure ProtectPowerPointDocument(const aFileName : String);
const
DBG_FUNC_NAME = 'ProtectPowerPointDocument';
var
_OlePPTApp,
_OlePPTPresentation: OleVariant;
_FileName :OleVariant;
_iLoop : Integer;
begin
_FileName := aFileName;
_OlePPTApp := CreateOleObject('PowerPoint.Application');
//_OlePPTApp.Visible := True; try
_OlePPTPresentation := _OlePPTApp.Presentations.Open(FileName := _FileName);
_OlePPTPresentation.Final := True;
_OlePPTApp.Quit;
Except
on E: Exception do
begin
DoLog(DBG_UNIT_NAME, DBG_FUNC_NAME, E.Message);
end;
end;
end;如果不把Visible设为True, 会弹出错误Presentations.Open 无效请求。求助,如何不让powerpoint程序显示出来,进行打开文件操作!
const
DBG_FUNC_NAME = 'ProtectPowerPointDocument';
var
_OlePPTApp,
_OlePPTPresentation: OleVariant;
_FileName :OleVariant;
_iLoop : Integer;
begin
_FileName := aFileName;
_OlePPTApp := CreateOleObject('PowerPoint.Application');
//_OlePPTApp.Visible := True; try
_OlePPTPresentation := _OlePPTApp.Presentations.Open(FileName := _FileName);
_OlePPTPresentation.Final := True;
_OlePPTApp.Quit;
Except
on E: Exception do
begin
DoLog(DBG_UNIT_NAME, DBG_FUNC_NAME, E.Message);
end;
end;
end;如果不把Visible设为True, 会弹出错误Presentations.Open 无效请求。求助,如何不让powerpoint程序显示出来,进行打开文件操作!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货