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 AspAllowOutOfProcComponent s
'oWebService.Put "AspAllowOutOfProcComponen ts", 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
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
' Enable AspAllowOutOfProcComponent
'oWebService.Put "AspAllowOutOfProcComponen
' 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
'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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.