Remove Office for Mac Without Losing Outlook Mail
Microsoft publishes a complete uninstall procedure for Office on Mac, and it works. The part worth slowing down for is a single sentence in the middle of it: three of the folders it asks you to delete hold your Outlook mail.
Microsoft says so plainly. Most guides that reproduce the folder list do not, and the list is long enough that by the time you reach those three you are deleting on autopilot.
The three folders that are not leftovers
Office keeps its state in two places under your Library, and the second one is where the risk is.
~/Library/Containers holds one folder per app: Microsoft Word, Microsoft Excel,
Microsoft PowerPoint, Microsoft OneNote, Microsoft Outlook, plus service folders like
Microsoft Error Reporting and com.microsoft.Office365ServiceV2.
~/Library/Group Containers holds three shared folders: UBF8T346G9.ms,
UBF8T346G9.Office, and UBF8T346G9.OfficeOsfWebHost.
Microsoft's instruction for that second set carries its own warning: Outlook data will be removed when you move those three folders to the Trash, and you should back them up before you delete them.
If your mail is a normal IMAP or Exchange account, the server still has it and a reinstall re-downloads it. If you have on-my-computer folders, archived mail that was never on a server, or an imported .olm, that content lives only in those folders.
Copy them out before the app goes
The safe move takes a minute. In Finder, press Command Shift G, go to
~/Library/Group Containers, and copy the three UBF8T346G9 folders to somewhere
outside your Library, such as an external drive or a folder on your Desktop.
Do this while Office is still installed and closed. A copy made afterwards is a copy of whatever survived, which is not the same thing.
Then follow Microsoft's order
Quit every Office app first. Move the apps from Applications to the Trash. Then remove the Containers folders, then the three Group Containers folders. Microsoft finishes with removing the icons from the Dock and restarting.
The restart matters more than it looks. Office runs background services and a reporting process that hold files open, and removing folders underneath a running process leaves you with a partial delete and no error message.
Signing out is a separate action from uninstalling
Removing the apps does not release the license from your Microsoft account, and it does not cancel a subscription. If the reason you are uninstalling is to move Office to another Mac, deactivate on the account side as well; if the reason is billing, cancel the subscription in your account. Neither happens because the files are gone.
What is safe to remove afterwards
Once the apps and their containers are gone, the remainder is ordinary: preference plists, caches, saved application state, and receipts. None of it holds anything you made. It is also the part people spend the most time on, which is backwards. The five minutes are better spent on the copy in the previous section.
Font collections are the one exception worth checking. Office installs fonts, and if you used them in documents that other people will open, removing Office removes the fonts those documents expect.
The list is long enough that reading it matters
The uninstall is not difficult. It is tedious, and tedium is what makes people stop reading halfway through a list of nine folders that all begin with Microsoft. The three that matter look exactly like the six that do not.
This is the case for having the whole footprint in front of you at once. Mole enumerates it with a size beside every entry, so a 40 MB error-reporting container and a 12 GB mail store are told apart by looking rather than by opening. Whatever you clear is recoverable from the Trash, which on a list this long is the safety net that matters.
Telling whether your mail is on the server
Account type decides this, not an Outlook setting.
IMAP and Exchange accounts treat the server as authoritative and the local copy as a cache, so a reinstall and a sign-in bring the mail back. POP is the opposite: messages are removed from the server as they arrive, so the local copy is the only one. Anything filed under On My Computer, and anything imported from an .olm, is also local only.
Outlook's account settings show the type for each account. A group of folders in the sidebar that belongs to no account is almost always a local archive, and that is the part worth exporting first. Outlook exports to .olm on its own; put the file somewhere outside your Library, not in one of the folders you are about to delete.