469,283 Members | 2,349 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

MSWord

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
Jan 13 '06 #1
6 1650
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" <pc*****@nospam.nospam> wrote in message
news:eh**************@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
Jan 13 '06 #2

"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:ue**************@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" <pc*****@nospam.nospam> wrote in message
news:eh**************@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.
Jan 13 '06 #3
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" <pc*****@nospam.nospam> wrote in message news:eh**************@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
Jan 13 '06 #4

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:u6**************@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" <pc*****@nospam.nospam> wrote in message news:eh**************@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?

Jan 16 '06 #5
this came in the nick of time. I can use this! I may not be fired!

"Peter" <pc*****@nospam.nospam> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:u6**************@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" <pc*****@nospam.nospam> wrote in message
news:eh**************@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?
Jan 16 '06 #6

"Tales Mein" <to******@doughpdu.com> wrote in message
news:uK********************@comcast.com...
this came in the nick of time. I can use this! I may not be fired!

"Peter" <pc*****@nospam.nospam> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:u6**************@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" <pc*****@nospam.nospam> wrote in message
news:eh**************@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("LetterS cript"))
{
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()");
}
}
Jan 17 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Tom Gao | last post: by
1 post views Thread by Eilsa | last post: by
reply views Thread by staleb | last post: by
2 posts views Thread by Guillaume Durand | last post: by
1 post views Thread by Jason Huang | last post: by
1 post views Thread by Matt Curreri | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.