microsoft word documents from ASP.NET

D

David

Using the article from this link,
http://www.codeproject.com/aspnet/wordapplication.asp, I have been playing
with generating Word documents using an ASP.NET application.

The only short coming is, unlike a windows application can do, I can't have
the app launch Word. Everything is being accomplished in the background
(opening up a word file, writes to it and saves it).

What I want to do is have Word launched with the text written by the ASP.NET
code, so that the user has a chance to further modify before saving it.

Here is the code from the article and note my attempt to make Word launched
and visible. Thanks in advance.

Word.ApplicationClass oWordApp = new Word.ApplicationClass();

Word.Document oWordDoc = oWordApp.Documents.Add(ref missing,
ref missing,ref missing, ref missing);

oWordApp.Visible = true; //here is my attempt to make it visible. Works in
a winform.
oWordDoc.Activate();

oWordApp.Selection.TypeText("This is the text");
oWordApp.Selection.TypeParagraph();
 
T

Trevor Benedict R

What you are trying to do is display the document in WORD on the SERVER.
You should instead create the file, download it to the client machine.
Let the user Save it locally & then upload the same to your Server.

If not you use be using an ActiveX or NET Control to achieve the same,
but that depends on what security decisions that you might have to take.

Regards,

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top