Link to home
Start Free TrialLog in
Avatar of edwardpoon
edwardpoon

asked on

Save HTML to Word Document

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
ASKER CERTIFIED SOLUTION
Avatar of CoreEye
CoreEye

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial