title: Generate word document and set orientation landscape with html
body: <p>I try to generate word document using this code:</p>
  
  <pre><code>    HttpContext.Current.Response.Clear();
      HttpContext.Current.Response.Charset = "";
  
      HttpContext.Current.Response.ContentType = "application/doc";
      HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; 
      filename=" + DateTime.Now + ".doc");
  
      var strHTMLContent = new StringBuilder();
  
      strHTMLContent.Append(
          "&lt;h1 title='Heading' align='Center'style='font-family: verdana; font 
      -size: 80 % ;color: black'&gt;&lt;u&gt;Document Heading&lt;/u&gt; &lt;/h1&gt; ");
  
      strHTMLContent.Append("&lt;br&gt;");
      strHTMLContent.Append("&lt;table align='Center'&gt;");
  
      // Row with Column headers
      strHTMLContent.Append("&lt;tr&gt;");
      strHTMLContent.Append("&lt;td style='width:100px; background:# 99CC00'&gt;
     &lt;b&gt;Column1 &lt;/b&gt;  &lt;/td&gt;");
  
      strHTMLContent.Append("&lt;td style='width:100px;background:# 99CC00'&gt;
     &lt;b&gt;Column2 &lt;/b&gt;  &lt;/td&gt;");
  
      strHTMLContent.Append("&lt;td style='width:100px; background:# 99CC00'&gt;
     &lt;b&gt;Column 3&lt;/b&gt;&lt;/td&gt;");
      strHTMLContent.Append(" &lt;/tr&gt; ");
  
      // First Row Data
      strHTMLContent.Append("&lt;tr&gt;");
      strHTMLContent.Append(
          "&lt;td style='width:100px'&gt;&lt;/td&gt;");
      strHTMLContent.Append(
          "&lt;td style='width:100px'&gt;b&lt;/td&gt;");
      strHTMLContent.Append(
          "&lt;td style='width:100px'&gt;c&lt;/td&gt;");
      strHTMLContent.Append("&lt;/tr&gt;");
  
      // Second Row Data
      strHTMLContent.Append("&lt;tr&gt;");
      strHTMLContent.Append(
          "&lt;td style='width:100px'&gt;d&lt;/td&gt;");
      strHTMLContent.Append(
          "&lt;td style='width:100px'&gt;e&lt;/td&gt;");
      strHTMLContent.Append(
          "&lt;td style='width:100px'&gt;f&lt;/td&gt;");
      strHTMLContent.Append("&lt;/tr&gt;");
  
      strHTMLContent.Append("&lt;/table&gt;");
  
      strHTMLContent.Append("&lt;br&gt;&lt;br&gt;");
      strHTMLContent.Append(
          "&lt;p align='Center'&gt; Note : This is a dynamically 
                  generated word document  &lt;/p&gt; ");
      HttpContext.Current.Response.Write(strHTMLContent);
      //  HttpContext.Current.Response.BinaryWrite(strHTMLContent);
      HttpContext.Current.Response.End();
      HttpContext.Current.Response.Flush();
  </code></pre>
  
  <p>It work fine but I want to make it landscape and in Print Layout cause it appears in Web Layout
  Can anybody help me?</p>