Hi,
As Andrea says, Server-side office automation is "doable" but really
not recommended.
You might want to look at XpertDoc, a fast and reliable technology
designed specifically for server-side, unattended creation of genuine
MS-Word documents.
It is very easy to set up, requiring little or no programming and
configuration.
You can download a free evaluation copy from
www.xpertdoc.com
Hope this helps!
"Andrea D'Onofrio" <andreado@microsoft.com> wrote in message news:<erKVSzAtDHA.4056@TK2MSFTNGP11.phx.gbl>...[color=blue]
> Server-side office automation is not supported by Microsoft, in this article
> you'll find the best way to configure the environment in this scenario:
> INFO: Considerations for Server-Side Automation of Office
>
>
http://support.microsoft.com/default...b;EN-US;257757
>
> These article explain how to create an office document server-side in a
> supported way:
>
http://support.microsoft.com/default...b;en-us;288130
>
>
http://support.microsoft.com/default...b;EN-US;311461
>
>
http://support.microsoft.com/default...b;en-us;270906
>
>
> These articles explain how to automate office application using client-side
> code:
> 178222 HOWTO: Launch Word from Internet Explorer
>
>
http://support.microsoft.com/?id=178222
>
> 183284 INFO: CreateObject in VBScript
>
>
http://support.microsoft.com/?id=183284
>
> 209149 WD2000: How to Pass a Parameter to a Macro Using Automation
>
>
http://support.microsoft.com/?id=209149
>
> 285176 HOWTO: Automate Word to Perform a Client-Side Mail Merge Using XML
> from
>
>
http://support.microsoft.com/?id=285176
>
> HtH
>
> Andrea
>
> "Yohancef Chin" <ychin@medstarholdings.com> wrote in message
> news:09da01c3b3c9$3c6f2060$a101280a@phx.gbl...[color=green]
> > Hi,
> >
> > Being fairly new to .NET I am looking for a way to call MS
> > Word from an event on a webform, and after the user is
> > finished save that created document to an SQL Server
> > database. Has anyone done this? Does it seem possible? I
> > followed the instructions from a sample on the Microsoft
> > knowledge base but it only seems to work when creating a
> > VB.NET Windows .EXE, not an VB.NET ASP app.
> >
> > Imports Word=Microsoft.Office.Interop.Word
> >
> > Dim oWord As Word.Application
> > Dim oDoc As Word.Document
> >
> >
> > 'Start Word and open the document template.
> > oWord = CreateObject("Word.Application")
> > oWord.Visible = True
> > oDoc = oWord.Documents.Add
> >
> > I changed the sample code to the following:
> >
> > Dim oWord As Word.ApplicationClass
> > Dim oDoc As Word.DocumentClass
> >
> >
> > 'Start Word and open the document template.
> > oWord = New Word.ApplicationClass()
> > oWord.Visible = True
> > oDoc = oWord.Documents.Add
> >
> > But when i build the solution it gives me the following
> > error:
> >
> > Access Denied
> >
> > Exception Details: System.UnauthorizedAccessException:
> > Access is denied.
> >
> > The ASP.NET process is not authorized to access the
> > request. For security reasons the default ASP.NET process
> > is '{machinename}\ASPNET' which has limited privileges.
> > Consider granting access rights to the resource to the
> > ASP.NET process identity.
> >
> > Line 31: oWord = New Word.ApplicationClass()
> >
> > But it does not specify what it is trying to gain access
> > to. I tried giving the asp account admin rights just to
> > test but that didnt work. I also lowered to security
> > settings on IE to test as well, and I gave the ASPNET
> > account full access to the
> > Microsoft.Office.Interop.Word.dll.
> >
> > Any ideas?
> >
> > Thanks.
> >[/color][/color]