E
enak
I have found some code that shows how to convert an html
form to Word. The message said to simply put the following
in the Page_load:
Response.ContentType = "application/ms-word"
Response.AddHeader("content-disposition", "inline;
filename=BP_CaseStatus.doc")
Now all I should have to do is create the page just like I
would if I were going to display it in the browser.
I create the document in the browser using code similar to
the following:
Response.Write("<table width=""100%"">")
Response.Write(" <tr height=1><td align=right><img
src=""images\bp_white2_icon.ico""></tr>")
Response.Write(" <tr><td align=center><font size=+3>My
Report</font></tr>")
Response.Write(" <tr><td align=center><font size=+3>BP
Cases Status Report</font></tr>")
'==============================================
'MAIN TABLE
'==============================================
Response.Write(" <tr><td>")
Response.Write(" <table border=0 width=""100%""
cellspacing=3 cellpadding=0>")
Response.Write(" <tr bgcolor=#bbbbbb><td>Lead
Plaintiff<td>Jurisdiction<td>Court<td>In-House
Counsel<td># of Pltfs<td>Status<td>BP Billing
Breakdown</tr>")
Response.Write(" </table>")
Response.Write(" </tr>")
'==============================================
'MAIN TABLE
'==============================================
Response.Write("</table>")
The page loads fine until I try to load it as a Word
document. I know that someone out there has done this.
Can anyone help?
Thanks
enak
form to Word. The message said to simply put the following
in the Page_load:
Response.ContentType = "application/ms-word"
Response.AddHeader("content-disposition", "inline;
filename=BP_CaseStatus.doc")
Now all I should have to do is create the page just like I
would if I were going to display it in the browser.
I create the document in the browser using code similar to
the following:
Response.Write("<table width=""100%"">")
Response.Write(" <tr height=1><td align=right><img
src=""images\bp_white2_icon.ico""></tr>")
Response.Write(" <tr><td align=center><font size=+3>My
Report</font></tr>")
Response.Write(" <tr><td align=center><font size=+3>BP
Cases Status Report</font></tr>")
'==============================================
'MAIN TABLE
'==============================================
Response.Write(" <tr><td>")
Response.Write(" <table border=0 width=""100%""
cellspacing=3 cellpadding=0>")
Response.Write(" <tr bgcolor=#bbbbbb><td>Lead
Plaintiff<td>Jurisdiction<td>Court<td>In-House
Counsel<td># of Pltfs<td>Status<td>BP Billing
Breakdown</tr>")
Response.Write(" </table>")
Response.Write(" </tr>")
'==============================================
'MAIN TABLE
'==============================================
Response.Write("</table>")
The page loads fine until I try to load it as a Word
document. I know that someone out there has done this.
Can anyone help?
Thanks
enak