Situation: When the client runs Office 365 update or Online repair, he may receive Couldn’t install with Error code 0-2031 (17004).
Troubleshooting: Download Microsoft Automatically Office Uninstallation Tool from this link: https://support.microsoft.com/en-us/office/uninstall-office-automatically-9ad57b43-fa12-859a-9cf0-b694637b3b05
uninstall office 365 and re-install it.