MSWord

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
 
S

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
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
 
P

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.
 
S

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



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
 
P

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?
 
T

Tales Mein

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 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?
 
P

Peter

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

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top