Word Document and ASP.net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear All,

Actually I am trying to open a word document in my ASP.net application.
I
am using the following code in Form Load Event:

Dim oWord As New Word.Application
Dim oDoc As Word.Document
oWord = CreateObject("Word.Application")
oWord.Visible = True
oDoc = oWord.Documents.Add

I am geting an error of Access denied. I have installed Primary Interop
Assemblies (PIAs) for Office XP and also have added reference (COM Library)
But still I am geting this error I know that I have to setup some sort of
permissions. But dont know where.

Any help would be greatly appreciated.

Cheers,
Sunil Sabir
 
Sunil Sabir said:
Dear All,

Actually I am trying to open a word document in my ASP.net application.
I
am using the following code in Form Load Event:

Dim oWord As New Word.Application
Dim oDoc As Word.Document
oWord = CreateObject("Word.Application")
oWord.Visible = True

Since this code is running on the server, what do you expect it to do?
 
Dear Tom,

Thanks for your reply. So what would be the solution for this.

Any help would be greatly appreciated.
 
Sunil Sabir said:
Dear Tom,

Thanks for your reply. So what would be the solution for this.

I won't offer a solution since running Office on the server in this way is
not supported. I would offer an alternative if you told me more about what
you're trying to do ...
 
Dear Tom,

Thanks for the reply. Actually I want to retrieve the database records and
display it
MS Word Document. Plus I want to add some extra things my Self.

Any help would be greatly appreciated.

cheers,
Sunil Sabir
 
Back
Top