Solved

Save HTML to Word Document

Posted on 2000-05-12
1
1,386 Views
Last Modified: 2008-03-03
Dear Experts,

I have created some letters for the users and the content are put into textareas and tables, after that they are edited by the users, then the content are outputted as HTML format.

Now I want to save this "HTML" into a word document, how can I do that?

I have tried the method posted previously by others but it didn't work

' Get the IIsWebService Admin object
'Set oWebService = GetObject("IIS://LocalHost/W3svc")

' Enable AspAllowOutOfProcComponents
'oWebService.Put "AspAllowOutOfProcComponents", True

' Save the changed value to the metabase
'oWebService.SetInfo

'set oWD = Server.CreateObject "Word.Application")
'oWD.Documents.Add
'oWD.selection.typetext "Hello, World!"
'oWD.ActiveDocument.SaveAs "C:\Temp\Hello.doc"
'oWD.ActiveDocument.Close
'oWD.Quit
'set oWD = Nothing


I got the error :
Permission denied: 'GetObject'
when I execute
Set oWebService = GetObject ("IIS://LocalHost/W3svc")

can anyone tell me why?
thx
0
Comment
Question by:edwardpoon
1 Comment
 

Accepted Solution

by:
CoreEye earned 50 total points
ID: 2806893
Hi,
 because if you are connecting the web site with anonymous account this error occurs. First give the site NT Authentication to connect then try it again. To do this in IIS manager select your site and click properties, at the "Directory Security" tab click "edit" and select "NT Challenge/Reponse".

And also it is enough to run this code once;

Set oWebService = GetObject("IIS://LocalHost/W3svc")

 Enable AspAllowOutOfProcComponents
oWebService.Put "AspAllowOutOfProcComponents", True

'oWebService.SetInfo

i guess you to execute this code in a seperate page once, then change your sites security settings to old state.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now