Home All Groups Group Topic Archive Search About
Author
13 Jan 2006 2:25 PM
Peter
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

Author
13 Jan 2006 3:07 PM
S. Justin Gengo [MCP]
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
Are all your drivers up to date? click for free checkup

Author
13 Jan 2006 5:52 PM
Peter
Show quote Hide quote
"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> wrote in
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
>

Unfortunatly this application has to be a Web application.
Author
13 Jan 2006 6:27 PM
Steve C. Orr [MVP, MCSD]
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
Author
16 Jan 2006 8:44 PM
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?
Author
16 Jan 2006 8:52 PM
Tales Mein
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?
Author
17 Jan 2006 5:09 AM
Peter
Show quote Hide quote
"Tales Mein" <toddo***@doughpdu.com> wrote in message
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?
>

I have found a solution to use to use JavaScript on the client side.



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

Bookmark and Share