B
bormesh
Hello,
I'm having an interesting yet seemingly easy to fix problem in an
Excel Addin that I have been developing. Within the Addin, I save the
current file as a temp file, and then I save it back to it's original
path. I also do the same thing in Microsoft Word. In Excel, I am asked
if I would like to overwrite the original file, whereas in Micrsoft
Word, the save takes place without any dialogs. I tried setting the
AlertBeforeOverwriting property of the excelApplication to false, but
it has no effect. Any ideas on this problem would be greatly
appreciated.
Thank You,
Rob Heinen
Here is the code:
excelApplication.AlertBeforeOverwriting = false;
excelApplication.ActiveWorkbook.SaveAs( tempPath, extension,
missing, missing, missing, missing,
XlSaveAsAccessMode.xlShared,
missing, missing, missing, missing, missing );
//resave as the original
excelApplication.ActiveWorkbook.SaveAs( origPath, extension,
missing, missing, missing, missing,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlShared, missing,
missing, missing, missing, missing );
I'm having an interesting yet seemingly easy to fix problem in an
Excel Addin that I have been developing. Within the Addin, I save the
current file as a temp file, and then I save it back to it's original
path. I also do the same thing in Microsoft Word. In Excel, I am asked
if I would like to overwrite the original file, whereas in Micrsoft
Word, the save takes place without any dialogs. I tried setting the
AlertBeforeOverwriting property of the excelApplication to false, but
it has no effect. Any ideas on this problem would be greatly
appreciated.
Thank You,
Rob Heinen
Here is the code:
excelApplication.AlertBeforeOverwriting = false;
excelApplication.ActiveWorkbook.SaveAs( tempPath, extension,
missing, missing, missing, missing,
XlSaveAsAccessMode.xlShared,
missing, missing, missing, missing, missing );
//resave as the original
excelApplication.ActiveWorkbook.SaveAs( origPath, extension,
missing, missing, missing, missing,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlShared, missing,
missing, missing, missing, missing );