How to overwrite a file automaticaly
My bad, try this:
objExcelApp.DisplayAlerts = False
objExcelApp.ActiveWorkbook.SaveAs "\\Backup\mybackup.xls"
objExcelApp.DisplayAlerts = True
'Application' is referring to Outlook, so the code should fail, so it
should be 'objExcelApp' because that is the reference to the Excel
application.
HTH,
JP
On Jan 24, 8:20*am, "bbnimda" wrote:
I tryed the two method above, but It doesn't change anything , I still have
a message asking me If I want to Overwrite the existing file.
Application.DisplayAlerts = False
objExcelApp.ActiveWorkbook.SaveAs "\\Backup\mybackup.xls"
Application.DisplayAlerts = True
and
Kill "\\Backup\mybackup.xls"
objExcelApp.ActiveWorkbook.SaveAs "\\Backup\mybackup.xls"
"JP" a écrit dans le message de news:
...
Can you be more specific?
Did you step through the code? If so, what line caused the error? And
what was the error message?
What version of Outlook are you using, and where exactly are you using
the code (class module, userform, outlook form, etc)?
Thx,
JP
|