none
Error saving Excel Workbook (ActiveWorkbook.SaveAs()) RRS feed

  • Question

  • Hello

    I wrote VSTO AddIn for Excel. I create a commandbar button and button click event will save the current Active Workbook to a given location using SaveAs and SaveAs throws an error with Exception "Exception from HRESULT: 0x800A03EC"

    I did try cultureinfo which did not work. Any idea why it is not working?

    Dim doc As Microsoft.Office.Interop.Excel.Workbook

    Dim

     

    str As String = FilePath & "\"

    & "Test.xls"

    doc.SaveAs(str, Excel.XlFileFormat.xlWorkbookNormal, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, Excel.XlSaveAsAccessMode.xlExclusive, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing)

     

     

     

    Thanks

     

    Thursday, July 28, 2011 3:09 PM

All replies