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();
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();