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.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: