Symptoms: When using an Automation or the WebClayStation client to create a Word/Excel/PDF/MHTML document either from a document template or when exporting data, the logs show errors such as “Could not create the Microsoft Office application object”, “ActiveX can't create Object” or “Automation Error”, or “Object not set”. However, when generating the same document using a desktop Clay client like ClayStation, it works. I.e. it only fails when running from a Windows Service like ClayCentral or WebClayStation.
Explanation: This is a fairly common problem that has to do with running Microsoft Office from a Windows Service. Since WebClayStation and ClayCentral both run as a Windows Service, and run as the Windows 'System' user, it is possible that this user does not have the correct permissions or resources that it needs for running Office applications. Clay currently depends on Microsoft Office to convert HTML documents to Word/Excel/PDF/MHTML and therefore requires a working installed instance of Office for this task.
Note that Clay has been tested successfully with all versions of Office (as of this update: 2013/2016/2019 and Office 365), both 32bit and 64bit, whether running as System or as another user, and all have worked. So it is usually a machine-specific or permission issue.
Sometimes, however, this functionality may break with Microsoft updates to either Windows and/or Office. For example, specifically, an updated version of Windows 10 in late 2020 combined with Office 2016/2019/365 also updated in 2020, did not work. Clay servers (ClayCentral & WebClayStation) still work with an updated Windows Server & Office, however. See the Solutions below for solving the issue with Windows 10.
Testing methods:
Solutions: