D
Daniel Walzenbach
Hi,
I need to know how I could populate a word file from within ASP.NET and stream it out to some user (I can rely on all users have at least Word XP installed).
The preferable solution would be to have a word template on the server which is populated in the asp.net application and then streamed out to the user.
Also acceptable would be to open a template on the client's computer using automation and fill this file (if this is possible).
Does anybody know how this can be done? Which way would be preferable? Create the file on the server and streaming it out to the user or using automation to populate a file on the client's computer?
I know that it's possible to sent html to excel (via automation) which is then nicely rendered (like in the following example).
<script language="vbscript">
Sub Button1_onclick()
Dim sHTML
sHTML = window.Form1.children("DataGrid1").outerhtml
Dim oXL, oBook
Set oXL = CreateObject("Excel.Application")
Set oBook = oXL.Workbooks.Add
oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML
oBook.HTMLProject.RefreshDocument
oXL.Visible = true
oXL.UserControl = true
end sub
</script>
Is there something similar possible with word? If
Thank you a lot for your help!
Daniel Walzenbach
I need to know how I could populate a word file from within ASP.NET and stream it out to some user (I can rely on all users have at least Word XP installed).
The preferable solution would be to have a word template on the server which is populated in the asp.net application and then streamed out to the user.
Also acceptable would be to open a template on the client's computer using automation and fill this file (if this is possible).
Does anybody know how this can be done? Which way would be preferable? Create the file on the server and streaming it out to the user or using automation to populate a file on the client's computer?
I know that it's possible to sent html to excel (via automation) which is then nicely rendered (like in the following example).
<script language="vbscript">
Sub Button1_onclick()
Dim sHTML
sHTML = window.Form1.children("DataGrid1").outerhtml
Dim oXL, oBook
Set oXL = CreateObject("Excel.Application")
Set oBook = oXL.Workbooks.Add
oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML
oBook.HTMLProject.RefreshDocument
oXL.Visible = true
oXL.UserControl = true
end sub
</script>
Is there something similar possible with word? If
Thank you a lot for your help!
Daniel Walzenbach