Here is the dynamic MS Word document generation in C#, You can use HTML tags and style sheets,
In this example table is designed not to appear even in non printable view. Usually tables will appear in word though they will not be seen when printed, In this example I have changed the border font color to white so as not to appear even in grey color, You can see MS specific style sheet tags:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.Buffer =true;
HttpContext.Current.Response.ContentType="application/msword";
HttpContext.Current.Response.Write(@"<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">");
HttpContext.Current.Response.AddHeader("Content-Disposition","attachment;filename=InvDetails.doc");
HttpContext.Current.Response.Charset = "utf-8"; //UTF8
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("windows-1250"); //windows-1250
HttpContext.Current.Response.Write("<font style='font-size:10.0pt; font-family:Verdana;'>");
HttpContext.Current.Response.Write("<BR><BR><BR>");
HttpContext.Current.Response.Write("<Table border='1' bgColor='#ffffff' borderColor='#ffffff' cellSpacing='0' cellPadding='0' style='font-size:10.0pt; font-family:Verdana; background:white;border-collapse:collapse;border:none;mso-border-alt:solid white .5pt;mso-border-right-alt:dotted white .5pt; mso-padding-alt:0in 0in 0in 0in;mso-border-insideh:.5pt dotted white; mso-border-insidev:.5pt dotted white'> <TR> <TD width=300>");
HttpContext.Current.Response.Write("MY First Row First cell Data");
HttpContext.Current.Response.Write("</Td><TD>");
HttpContext.Current.Response.Write("My First Row Second Cell Data");
HttpContext.Current.Response.Write("</Td></TR><TR><TD width=300>");
HttpContext.Current.Response.Write("MY Second Row First cell Data");
HttpContext.Current.Response.Write("</Td><TD>");
HttpContext.Current.Response.Write("My Second Row Second Cell Data");
HttpContext.Current.Response.Write("</Td></TR></TABLE>");
HttpContext.Current.Response.Write("<BR><BR><BR>");
HttpContext.Current.Response.Write("<U>");
HttpContext.Current.Response.Write("UnderLined data");
HttpContext.Current.Response.Write("</U>");
HttpContext.Current.Response.Write("<BR><BR><BR>");
HttpContext.Current.Response.Write("<P>");
HttpContext.Current.Response.Write("This is paragraph data which can be placed in single line, when it appears in word it will have autofit. Today's date in specific format::");1
HttpContext.Current.Response.Write(String.Format("{0:d-MMMM-yyyy}", DateTime.Now));
HttpContext.Current.Response.Write("</P>");
HttpContext.Current.Response.Write("</font>");
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
Here it ends...