MSWord

  • Thread starter Thread starter Peter
  • Start date Start date
P

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
 
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
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
 
S. Justin Gengo said:
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
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.
 
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



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

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



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!


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



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?
 
Tales Mein said:
this came in the nick of time. I can use this! I may not be fired!


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



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