I recently ran into a situation where I had to re-install Office 365 and continuously received this, or similar errors when attempting to do so. I tried quite a few things that were supposed to fix it. The registry modification below is what worked for me.
Delete the Office registry subkeys to fix Error Code
- Open Registry Editor.
- Delete the following registry subkeys: