title: Excel 2003 VSTO convert to PDF
body: <p>I have an excel workbook vsto solution that needs to generate a pdf copy of one of its sheets as output. </p>
  
  <p>I have a license for abcdpdf .net and tried outputting to html, then using abcpdf to convert the html to pdf, but the excel html markup tries to emulate excel with all 4 worksheets with horrible markup. It also messes up the colors (silver background across entire workbook).</p>
  
  <p>Any suggestions?</p>
  
  <p>Here is the code I'm currently using to generate the html file:</p>
  
  <pre><code>FileInfo excelDoc = new FileInfo(Globals.ThisWorkbook.Path + @"\Document.html");
  
  Globals.Sheet2.SaveAs(excelDoc.FullName,
      Excel.XlFileFormat.xlHtml, missing, missing, false, false,
      Excel.XlSaveAsAccessMode.xlNoChange,
      missing, missing, missing);
  </code></pre>
  
  <p>If I hack away some of the html header tags manually, I can get abcdpf to accept it, but the formatting is a bit off and this solution seems sub optimal.</p>
  
  <p>Thanks in advance.</p>