0

I had some rather complex macros that I have developed for Outlook 365 over several years to help me organize my To Do list. They have been working just fine, but over the last few days I made some changes to them that seemed to be working OK, but after having made some more changes, when I went back into Outlook proper, it crashed.

Upon restarting Outlook, my macros were no longer working. I went to the VBA editor and my tree of modules, objects and userforms was there, but I could not open any of them. It was as if the macros themselves disappeared. Despite my best efforts, I can't recover them.

After some research, I discovered that the file VbaProject.OTM was where the macros were stored and that replacing it with a backup of the same file could solve the problem, so I copied the existing VbaProject.OTM file to preserve it, but could not find a backup of it to use.

These macros represent years of work and are now entirely gone. Is there another way to restore them? Does Outlook 365 make backups of the VbaProject.OTM file automatically? If so, where are they located? I have autosave turned on for my xls* files and I save (not export) my macros regularly. Could a copy of VbaProject.OTM exist somewhere in my OneDrive or SharePoint? If so, I haven't been able to find it. Any help would be appreciated.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • 1
    Have a look at this: https://stackoverflow.com/questions/233702/where-does-outlook-store-the-vba-code-files . I do hope you can maybe restore an older version of the file you're using (rightclick -> restore previous versions). If so, make a backup ASAP. – Notus_Panda Jan 05 '23 at 21:19

1 Answers1

0

Office365 doesn't make any backups.

All Outlook macros are stored in a single file named VbaProject.otm in the user's %appdata%\Microsoft\Outlook folder, which will be a hidden folder on most systems.

If you do not see it now, then you probably won't be able to restore macros from that location. Most probably you will end up with an "empty" project there or no project at all, but if that folder is being backed up, you might be able to restore it.

You may consider exporting your macros periodically in case this happens again, either through the VBA IDE (right-click and select Export File) or using one of the third-party tools you may find over the internet.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45