0
votes

While developing code, I deleted the code I was working on.

ThisOutlookSession was somehow deleted and replaced with "Module2". Every time I boot up VBA now, I get a warning saying that the program does not trust Module2.

I can get ThisOutlookSession back as a separate Class Module, but not the same type as it was previously.

Is there a way to restore ThisOutlookSession to default status?

I am running Outlook 2010 w/VBA on an XP system.

1

1 Answers

2
votes

Copy the code you have and save it somewhere.

Search for VbaProject.OTM in a Windows folder. Rename it something like VbaProjectOld.OTM. Do not delete until you see this works.

Restart Outlook. VbaProject.OTM should be regenerated and you should get a new ThisOutlookSession. Paste the code you salvaged in the appropriate modules.