Cause of Document Not Saved in Microsoft Office
Windows added some updates on my system. I am using Office 2007. It was working fine before. But as the new updates were installed I am not able to save my documents. I am getting a error on the same. When I try to save the file no a network drive the application freezes and then I am not able to save the files. It is a bit complicated to work on it. There was no issue with the same before.
re: Cause of Document Not Saved in Microsoft Office
Solution:
I have an Excel file with 16 sheets having embedded objects. One of the sheets (16th sheet) is the summary of the other 15 sheets (embedded objects & data). I did some processing and tried to save as the file but it did not save the 14 sheet, error "document not saved,". I added below subroutine and called this during the other process and it resolved the problem.
Sub ListAllObjectsActiveSheet()
Dim NewSheet As Worksheet
Dim MySheet As Worksheet
Dim myshape As Shape
Dim I As Long
Set MySheet = ActiveSheet
Set NewSheet = Worksheets.Add
With NewSheet
.Range("A1").Value = "Name"
.Range("B1").Value = "Visible(-1) or Not Visible(0)"
.Range("C1").Value = "Shape type"
I = 2
For Each myshape In MySheet.Shapes
.Cells(I, 1).Value = myshape.Name
.Cells(I, 2).Value = myshape.Visible
.Cells(I, 3).Value = myshape.Type
I = I + 1
Next myshape
.Range("A1:C1").Font.Bold = True
.Columns.AutoFit
.Range("A1:C" & Rows.Count).Sort Key1:=Range("C1"), _
Order1:=xlAscending, Header:=xlYes
End With
End Sub