There is no BeforeClose event in Outlook. Only the Application.Quit event. But you can't Cancel the Application.Quit event to stop Outlook from closing.
Application.Quit event (Outlook) | Microsoft Learn
General tips on Outlook VBA
How to use Outlook's VBA Editor | Slipstick Systems