Solved

Save HTML to Word Document

Posted on 2000-05-12
1
1,395 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Summernote and form validation 10 226
Pass through dll 2 99
Save ms data to server side. 19 59
SQL Query Returns Records in SSMS but not Classic ASP 5 20
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

762 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