How To Add Microsoft Excel Application In Dcom Config

Oct 17, 2012  Hi, I would like to config the Microsoft Word Application in DCOM for some function in my project. So, I completely installed the Microsoft Office Professional Edition 2003 (32-bit version) in my s.

CAUTION: Automation of any Office application from an unattended, non-interactive user account is risky and unstable. A single error in code or configuration can result in a dialog box that can cause the client process to stop responding (hang), that can corrupt data, or that can even crash the calling process (which can bring down your Web server if the client is ASP). WARNING: Office was not designed, and is not safe, for unattended execution on a server. Developers who use Office in this manner do so at their own risk. Regardless, it may absolutely required to use Office in this manner. In these cases, special configuration must be done to avoid errors on Office startup.

The steps in this article demonstrate how to configure Office to run as the interactive user account when it is started for Automation. When you automate from within a COM+/MTS Package, you should be aware of the following problems: • The DCOM Identity setting for the Office application should be set to the launching user. This allows the Office application to run under the identity that is configured in the package. Other applications on the system that automate Office should be unaffected by this change. Those Office applications still run as the identity of the launching user. Tamil tv serial actress hot. • This solution works only if you have a dynamic-link library (DLL) that is used to automate Office, or if you are automating from a Web page and have the application set to run in Isolated mode. • When COM loads a server to run as a specific user account, the registry hive for that user is not loaded.

Because the hive is not loaded for that user, the system.DEFAULT hive is used. Because Office has not been run under an account with this hive, you may receive dialog boxes that prompt you for input or the Office CDs to complete installation. The dialog boxes are not visible on the interactive desktop, so the application appears to stop responding (hang). The dialog boxes may time out and allow the process to continue, but after a noticeable delay in running the program. To work around this situation, install an NT service that runs under the same user account that is set for the DCOM setting.

The NT Service Control Manager (SCM) loads the hive for that user when the service starts. If the problems listed here are too great for your design, or cause other unidentified problems, it is possible to configure Office differently and still allow it to start from an unattended process or service. For additional information, click the following article number to view the article in the Microsoft Knowledge Base. How to configure Office applications to run under a specific user account Configuring Office as the launching user To set up an Office Automation server as the launching user account, follow these steps: • Log on to the computer as the Administrator and create a new user account that will automate Office. In our example, this account is named OfficeAutomationUser. Create a password for this user account, and select Never expire so that the password does not have to be changed.

• Add the OfficeAutomationUser account to the Administrators group. • Log in to the computer as OfficeAutomationUser and install (or reinstall) Office using a complete install. For system robustness, it is recommended that you copy the contents of the Office CD-ROM to a local drive and install Office from this location. • Start the Office application that you intend to automate. This forces the application to register itself. • After the application is running, press ALT+F11 to load the Microsoft Visual Basic for Applications (VBA) editor. This forces VBA to initialize itself.