|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
I have to write a ASP.NET application that creates MSWord document from a template and populated with data from the webpage.
(Templates can reside on the server or client's hard drive.) What is the best way to do this? Is it good idea to have MSWord installed on the server? If it's not a good idea or if MSWord is not installed on the server what are the alternatives? I am using Office 2003. Thank You Peter Peter,
I wouldn't install word on the server... I would create a web service that may be called to get the data from the server. Then I'd create a windows application (which could use zero touch deployment from the server to install on the client). That application would contact the web service and create the document. -- Sincerely, S. Justin Gengo, MCP Web Developer / Programmer www.aboutfortunate.com "Out of chaos comes order." Nietzsche "Peter" <pczurak@nospam.nospam> wrote in message I have to write a ASP.NET application that creates MSWord document from a news:ehHBz0EGGHA.1032@TK2MSFTNGP11.phx.gbl... template and populated with data from the webpage. (Templates can reside on the server or client's hard drive.) What is the best way to do this? Is it good idea to have MSWord installed on the server? If it's not a good idea or if MSWord is not installed on the server what are the alternatives? I am using Office 2003. Thank You Peter
Show quote
Hide quote
"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> wrote in Unfortunatly this application has to be a Web application.message news:ueb2EMFGGHA.2212@TK2MSFTNGP15.phx.gbl... > Peter, > > I wouldn't install word on the server... > > I would create a web service that may be called to get the data from the > server. Then I'd create a windows application (which could use zero touch > deployment from the server to install on the client). That application > would contact the web service and create the document. > > -- > Sincerely, > > S. Justin Gengo, MCP > Web Developer / Programmer > > www.aboutfortunate.com > > "Out of chaos comes order." > Nietzsche > "Peter" <pczurak@nospam.nospam> wrote in message > news:ehHBz0EGGHA.1032@TK2MSFTNGP11.phx.gbl... > I have to write a ASP.NET application that creates MSWord document from a > template and populated with data from the webpage. > (Templates can reside on the server or client's hard drive.) > > What is the best way to do this? > Is it good idea to have MSWord installed on the server? If it's not a good > idea or if MSWord is not installed on the server what are the > alternatives? I am using Office 2003. > > Thank You > > > > Peter > Do not use MSWord on the server. It's not meant for such purposes.
You could use VSTO 2005. Or you could use one of these techniques: http://SteveOrr.net/articles/ExcelExport.aspx http://SteveOrr.net/articles/ExportPanel.aspx http://SteveOrr.net/reviews/AsposeWord.aspx "Peter" <pczurak@nospam.nospam> wrote in message news:ehHBz0EGGHA.1032@TK2MSFTNGP11.phx.gbl... I have to write a ASP.NET application that creates MSWord document from a template and populated with data from the webpage.(Templates can reside on the server or client's hard drive.) What is the best way to do this? Is it good idea to have MSWord installed on the server? If it's not a good idea or if MSWord is not installed on the server what are the alternatives? I am using Office 2003. Thank You Peter "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:u6wfF8GGGHA.1100@TK2MSFTNGP10.phx.gbl... Do not use MSWord on the server. It's not meant for such purposes.You could use VSTO 2005. Or you could use one of these techniques: http://SteveOrr.net/articles/ExcelExport.aspx http://SteveOrr.net/articles/ExportPanel.aspx http://SteveOrr.net/reviews/AsposeWord.aspx -- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net "Peter" <pczurak@nospam.nospam> wrote in message news:ehHBz0EGGHA.1032@TK2MSFTNGP11.phx.gbl... I have to write a ASP.NET application that creates MSWord document from a template and populated with data from the webpage.(Templates can reside on the server or client's hard drive.) What is the best way to do this? Is it good idea to have MSWord installed on the server? If it's not a good idea or if MSWord is not installed on the server what are the alternatives? I am using Office 2003. Thank You Peter What about using JavaScript, is it posible to open Word Template and populate the Word Document using JavaScript on the client? this came in the nick of time. I can use this! I may not be fired!
"Peter" <pczurak@nospam.nospam> wrote in message Do not use MSWord on the server. It's not meant for such purposes.news:%23$r$p2tGGHA.216@TK2MSFTNGP15.phx.gbl... "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:u6wfF8GGGHA.1100@TK2MSFTNGP10.phx.gbl... You could use VSTO 2005. Or you could use one of these techniques: http://SteveOrr.net/articles/ExcelExport.aspx http://SteveOrr.net/articles/ExportPanel.aspx http://SteveOrr.net/reviews/AsposeWord.aspx "Peter" <pczurak@nospam.nospam> wrote in message I have to write a ASP.NET application that creates MSWord document from a news:ehHBz0EGGHA.1032@TK2MSFTNGP11.phx.gbl... template and populated with data from the webpage. (Templates can reside on the server or client's hard drive.) What is the best way to do this? Is it good idea to have MSWord installed on the server? If it's not a good idea or if MSWord is not installed on the server what are the alternatives? I am using Office 2003. Thank You Peter What about using JavaScript, is it posible to open Word Template and populate the Word Document using JavaScript on the client?
Show quote
Hide quote
"Tales Mein" <toddo***@doughpdu.com> wrote in message I have found a solution to use to use JavaScript on the client side.news:uK2dnUDDhqcPmlHeRVn-rA@comcast.com... > this came in the nick of time. I can use this! I may not be fired! > > "Peter" <pczurak@nospam.nospam> wrote in message > news:%23$r$p2tGGHA.216@TK2MSFTNGP15.phx.gbl... > > "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message > news:u6wfF8GGGHA.1100@TK2MSFTNGP10.phx.gbl... > Do not use MSWord on the server. It's not meant for such purposes. > You could use VSTO 2005. > Or you could use one of these techniques: > http://SteveOrr.net/articles/ExcelExport.aspx > http://SteveOrr.net/articles/ExportPanel.aspx > http://SteveOrr.net/reviews/AsposeWord.aspx > > -- > I hope this helps, > Steve C. Orr, MCSD, MVP > http://SteveOrr.net > > > > "Peter" <pczurak@nospam.nospam> wrote in message > news:ehHBz0EGGHA.1032@TK2MSFTNGP11.phx.gbl... > I have to write a ASP.NET application that creates MSWord document from a > template and populated with data from the webpage. > (Templates can reside on the server or client's hard drive.) > > What is the best way to do this? > Is it good idea to have MSWord installed on the server? If it's not a good > idea or if MSWord is not installed on the server what are the > alternatives? I am using Office 2003. > > Thank You > > > > Peter > > What about using JavaScript, is it posible to open Word Template and > populate the Word Document using JavaScript on the client? > private void Page_Load(object sender, System.EventArgs e) { if(!this.IsPostBack) { if (!this.Page.IsClientScriptBlockRegistered("LetterScript")) { this.Page.RegisterClientScriptBlock( "LetterScript", "<script language=javascript>" + "function CreateLetter(){" + "var word = new ActiveXObject(\"Word.Application\");" + "word.Visible = true; " + "var file = document.getElementById('txtTemplate').value; " + "var objDoc = word.Documents.Add(file); " + "objDoc.FormFields(\"FirstName\").Result = document.getElementById('txtFirstName').value; " + "objDoc.FormFields(\"LastName\").Result = document.getElementById('txtLastName').value; " + "} " + "</script>"); } this.Button1.Attributes.Add("onClick", "CreateLetter()"); } }
Other interesting topics
global functions?
Basic question about database connection in ASP.NET Why so much trouble with ellipses? Common functionality across pages, what's the best solution? reference to a "global" variable from within an aspx page DataGrid, Edit and the Enter Key Asp.net 2.0 caching and images ASP.NET Embedded Resources Very Strange Problem! (Derived Controls) - Help! Architectural assistance needed! |
|||||||||||||||||||||||