This error code generally happen due to installation file got corrupted or after your office suite get updated and and installed properly.
So i am mentioning some common steps to resolve this error 0-1012 for your PC.
These errors related to error code 0-1005 can be troubleshot by:
Note: If you are not able to understand the above causes of error code 0-1012, you must not proceed and do these steps on your own.
Still you are getting same error code 0-1012 then you may take a reference fro other sites to link i took a reference from https://mschathelp.com/office-365-error-code-0-1012/