Looking to Recover your Global.MPT? You’re in good company….

When working with Microsoft Project (MSP), there is nothing more frustrating than losing the hard work you’ve put into a file whether it’s a schedule or VBA / Macros to work with your schedule.

Today I’m here writing about ways to try to recover your Global.MPT because I completely lost it today…. or so I thought.  I was happily coding away building an awesome script in VBA  and was feeling such success when this setback had me going from blissful to horrified in seconds.  The code hung and I had to force MSP to close.  Once I tried to open it back again and go to my code, it was all gone!  The first thought that crossed my mind was, “Why didn’t I back it up?!?”  followed by, “How  could I have done such a rookie mistake?!?”

I then tried to calm down and try to troubleshoot and see if I had actually lost it all.   The thing is, I keep a backup of all my code that I push to production from the development environment. The code that I build as helper functions such as adding text to the beginning or the end of a group of tasks quickly, this code I keep it in my .MPT file because I don’t want to keep it in the development environment and accidentally push it to production.  I had built quite a few of this functions in the last couple of weeks, but hadn’t taken the time to back them up…. they are just little helper functions anyway, right?  Hard lesson to learn was how important they are to me once I realized they were all gone….

A quick search online does not quickly give you ways to try to restore your Global.MPT file.  I had to dig deep to actually find different methods to try.  I will add the two that might give you results.  Firstly, to find where in your computer you might find your Global.MPT,  you can check out this article from Microsoft Support.

Once I found my Global.MPT  on my computer at:

“C:/users/[your user name]/App data/Roaming/Microsoft/MS Project/1033”

I then immediately:

  1. Closed Microsoft Project completely
  2. Copied the Global.MPT file to a new folder
  3. Once I had a copy, I went back to the above address and renamade the file and changed the extension of the file to .MPP
  4. Then I opened the newly renamed file in step 3 with Microsoft Project
  5. The organizer pops up, then choose the Modules tab and copy all the “lost” modules to your new MPT file
  6. Make sure to reset any references in your library you were using for your macros if any

Of course, this doesn’t work for everyone.  If you are one of the unlucky ones, I have one more trick up my sleeve.  I found this solution when I was ready to give up on recuperating my awesome code.  I had already started to mourn the loss of such great work…

  1. Go to C:\Users\[Your User Name]\AppData\Local\Temp
  2. Filter by Date
  3. Scroll down until you find your latest, mine was: “AutoRecovery Save of Global (183).MPT
  4. I immediately made a copy before I attempted to open.
  5. Once I had the backup, I renamed the file and changed the extension to .MPP
  6. I opened it and the Organizer was immediately launched.
  7. I copied over my code from the Modules tab to my new file.

I cannot tell you the immense relief I felt once I figured I hadn’t lost it all.  I can recreate the few lines I did lose, but those helper functions are life (and time) savers for sure!

The moral of the story for both you and I is to make sure to create backups of ALL your code.  Even code that you might not think is very important.  It’s better to have it and not need it, than to need it and not have it.

Some ideas to save your code would be first of all NOT keep the code in Global.MPT.  Even if you do, make sure to save your code in an actual .MPP file and create backups of that.  Also, you can export your modules as .bas files or .frm for forms to a folder on your desktop.  I’ve actually created code that exports all of them quickly.  That’s one of the sub routines I had thought lost forever!  That would have been a shame to lose….

Anyway, good luck  recuperating your Global.MPT file…. know that you are in good company!



Leave a comment