Automate Microsoft Office Programs from within ASP

Automate Microsoft Office Programs from within ASP

Creating dynamic Microsoft documents may be useful. The problem is that creating Word documents in ASP will result in an error saying that IIS cannot run out of process components. You can change this IIS setting to allow it to use such components so you can deliver dynamic Office documents to the Web.
Simply run the following ASP code under an administrative account:

    Set oWebService = GetObject("IIS://LocalHost/W3svc")   oWebService.Put "AspAllowOutOfProcComponents", True   oWebService.SetInfo

You will need to restart the W3SVC service to make this effective and to finally be allowed to create objects such as Word.Document.


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist