One of my customer reported that he installed Office 2016 on a PC and tried creating a macro in Outlook then he received error messages "Unexpected error, quitting", followed by "Out of memory".
We tried opening the Outlook VBA Editor, unfortunately it doesn’t open either. Alternately we checked and made sure that they don’t see the same behavior with other office apps like Excel, Word as the macro works without any problem. In general, if an Office application isn’t working properly, sometimes restarting it will fix the problem. If that doesn’t work, you can try repairing it. When you’re done, you might need to restart your computer.
So in this scenario, as part of troubleshooting, we tried repairing the Outlook using the following steps: Start > Control Panel > Programs > Programs and Features > Select Office 2016 > Change > select “Quick Repair” or “Online Repair” and click “Repair” button.
It performed the repair based on the user selection. On successful repair, he can successfully create the Outlook macro & helped him move forward.
Hope this helps.