M
Mahesh_D
Hi,
In Excel-2007 addin, in ShutDown functionality for closing all open files.
I have written following code:
Try
'Close All Open documents
Dim exlWorkBook As Excel.Workbook
If Application.Workbooks.Count = 1 Then
Application.ActiveWorkbook.Close(False)
Else
For Each exlWorkBook In Application.Workbooks
exlWorkBook.Close(False)
Next
End If
Catch ex As Exception
Debug.WriteLine(ex.Message)
End Try
The exception is "Exception from HRESULT: 0x800AC472".
Any suggesstions will be helpful.
Thanks
Mahesh
In Excel-2007 addin, in ShutDown functionality for closing all open files.
I have written following code:
Try
'Close All Open documents
Dim exlWorkBook As Excel.Workbook
If Application.Workbooks.Count = 1 Then
Application.ActiveWorkbook.Close(False)
Else
For Each exlWorkBook In Application.Workbooks
exlWorkBook.Close(False)
Next
End If
Catch ex As Exception
Debug.WriteLine(ex.Message)
End Try
The exception is "Exception from HRESULT: 0x800AC472".
Any suggesstions will be helpful.
Thanks
Mahesh