None of the Office applications work properly when called from a server environment. Their COM interfaces are meant for desktop automation, not automation from a server application. Anything you do to try to make them work will involve hacks built upon hacks, and is doomed to failure.
This leaves aside the fact that you are not licensed to run them from a server application.
Correction: The KB article Considerations for server-side Automation of Office does indeed say that you are licensed for server-side automation of Office products for use only if the clients are all licensed:
Besides the technical problems, you must also consider licensing issues. Current licensing guidelines prevent Office applications from being used on a server to service client requests, unless those clients themselves have licensed copies of Office. Using server-side Automation to provide Office functionality to unlicensed workstations is not covered by the End User License Agreement (EULA).
On the other hand, that KB article lists a large number of reasons to never do this. They include:
- User Identity
- Interactivity with the desktop
- Reentrancy and scalability
- Resiliency and stability
- Server-side security
I recommend this KB article to anyone considering server-side automation of Office products.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…