Excel automation

When I execute the following statement:

oWorkbook.GetType().InvokeMember("SaveAs", BindingFlags.InvokeMethod,
null, oWorkbook, Parameters);

I get a popup which asks if I want to replace the existing file with the same name. Is there any way I can suppress this message and do a save anyway.
[313 byte] By [TeenC] at [2007-11-20 11:44:19]
# 1 Re: Excel automation
Try something like this before the save :
YourExcelObject.InvokeMember("DisplayAlerts", BindingFlags.SetProperty, null, _apl, new object[] { false });
DisplayAlerts will "suppress" that dialog. If my above code is not correct ( not sure about it ), search google for DisplayAlerts.
HanneSThEGreaT at 2007-11-9 11:37:03 >
# 2 Re: Excel automation
whoopeeee!!! It works !
TeenC at 2007-11-9 11:38:03 >
# 3 Re: Excel automation
Well Done! :thumb:
HanneSThEGreaT at 2007-11-9 11:39:02 >