Solved

Save HTML to Word Document

Posted on 2000-05-12
1
1,398 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 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