ThisOutlookSession in VBA not there anymore and code is gone

SmileyFtW

Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Using Outlook 2007 and Win XP.




Yesterday I invoked a VBA procedure (it empties all of my Deleted Items Folders), and for some reason Outlook crashed. I have been using this procedure for several years, so I know that it was stable.




Now when I open Outlook, I get the Enable/Disable Macros dialog as usual, but when I click on either Enable or Disable I now get another dialog saying File Not Found.




Opening the VBE, there is nothing in the Explorer window.




I have tried the Office Diagnostics, rebooting, etc with no luck. The .OTM file that has the code is still where it always has been. I have no way of knowing if it has been corrupted and is the source of the problem.




Any suggestions?




Thanks,




David
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I hope you have a backup of the VBA... for whatever reason, the VBA module was corrupt so outlook replaced it with a fresh new file. It's hard to say if the crash corrupted it or something else - like a virus scan - was responsible.
 

SmileyFtW

Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
I hope you have a backup of the VBA... for whatever reason, the VBA module was corrupt so outlook replaced it with a fresh new file. It's hard to say if the crash corrupted it or something else - like a virus scan - was responsible.



It turned out to be a corrupt .OTM file as you suggested. Thankfully I had a copy of MOST of the VBA and will only have to recreate a small part that I had added recently.




However, the corrupt .OTM file was preventing Outlook from creating a new one. As a result, I moved the corrupt one out of the Outlook folder it was in and Outlook then could create a new ThisOutlookSession. I was then able to import the saved VBA and save a new .OTM file.




Thanks for teh reply!




David
 
Top