Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Problem in accessing Word application object

Hi,
I want to create a word document using "Microsoft word 9.0 object Library"
in a Web method of Web Service. I have included the refernce to "word 9.0
object library" in the web service project. When i try to run the following
code

<WebMethod()> public Function CreateWordDocument() as String
Dim WA As New Word.Application()
Dim WD As Word.Document

WD=WA.Documents.Add()
...
...
End Function

in the web method , it gives the error : Access Denied , for the First Statement
(Dim WA As New Word.Application()).

Is it a IIS security settings problem or Web Service cannot access COM objects
via .NET-COM interoperability ?

Please help me.

Thanks,
Ganesh
[761 byte] By [Ganesh] at [2007-11-9 19:48:18]