Open file and keep it hidden

J

jodleren

Hi all

Is there a way I can open a file, and keep it hidden?
I need to open some file, and change them then save them - the problem
is when excel is open, and I get a new window - it appear for 1-2 secs
in the task bar, and might be shown excel.
Can I avoid that?

if VarIsEmpty(ExcelApplication) then
try
ExcelApplication := GetActiveOleObject('Excel.Application');
except
ExcelApplication := CreateOleObject('Excel.Application');
//ExcelApplication.Visible := True; {enable this line for
debugging}
end;
ExcelApplication.DisplayAlerts := wdAlertsNone;
// ****** keep this hidden: *******
ExcelApplication.Workbooks.Open(ExtractFilePath(ParamStr(0)) +
'test.xls');

WBR
Sonnich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top