Microsoft Office has components for using in third party applications: COM Objects for C++ and Interop Assemblies for .Net programming.
Many Cache projects used to include calls to those libraries. However, recently this solution started being problematic.
There are two main reasons - legal and technical. Let’s check the details.
Microsoft technology support
Microsoft is supporting Office Automation only for desktop computing.
It shall not be used for server computing, as they offer Sharepoint for this scenario. Have a look here:
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behaviour and/or deadlock when Office is run in this environment."
Knowing that, I would recommend to use SharePoint or third party solutions for working with Office data.
Settings bypassing limitations
If you still want to risk and TEST using such solution, or need to have it working TEMPORARILY, you need to resolve the following technical issues.
a. Under 64 bit Windows you need 64-bit windows Office installed. 32 bit office may not be used with 64 bit processes, and Cache will be 64 bit process under 64 bit Windows
b. Latest updates of Windows closed down background processes from interacting from users. Office components needs such interaction. You need to allow server processes to interact with users by setting:
Set this registry to 0 and reboot machine.
c. If you use COM objects, you may need one more hack.
Localize DCOM settings - either in control panel or using shell - please note that you must use:
- panel for X64 or
- shell for X86: mmc comexp.msc /32
Change DCOM settings:
node "Word 97 - 2003"
change setting lookup option Identity to "Interactive user".
You are still at risk of stability of your system after applying the above settings, so again I would recommend to use SharePoint or third party solutions for working with Office data.