This either works or it doesn't (depending on how corrupted things are), so it won't take more than a few minutes. It's macro code to run from within Word VBA. I don't recall where I found this method, and I've modified it since first finding it on the web. Here's what to do:
Copy the code into a normal word VBA module. Change the filename in the code to something you want. Establish a reference to the Microsoft Excel 9.0 Object Library:
Tools, References, check the box next to this entry.
Execute the code (cursor in module; press F5).
if you get an File Open error message, click Debug, then Continue.
When the code has executed, look in the RecoverPath folder. Import each of the *.txt files into your VBA project. Excel will rename the txt files to the original module name, although you may have to copy the contents of ThisWorkbook from a class module into the actual ThisWorkbook folder.
Sub Recover_Excel_VBA_modules()
Dim XL As Excel.Application
Dim XLVBE As Object
Dim i As Integer, j As Integer
Dim XLSFileName As String, RecoverPath as string
XLSFileName = "c:\windows\desktop\publication catalog"
RecoverPath="C:\temp\"
Set XL = New Excel.Application
XL.Workbooks.Open FileName:=XLSFileName + ".xls"
Set XLVBE = XL.VBE
j = XLVBE.VBProjects(1).VBComponents.Count
For i = 1 To j
Debug.Print XLVBE.VBProjects(1).VBComponents(i).Name
XLVBE.VBProjects(1).VBComponents(i).Export _
FileName:=recoverpath & _
XLVBE.VBProjects(1).VBComponents(i).Name & ".txt"
Next
XL.Quit
Set XL = Nothing
End Sub
Rob
![[flowerface] [flowerface] [flowerface]](/data/assets/smilies/flowerface.gif)