Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. /* make new message object */
  2. Message msg = new MessageClass();
  3. ADODB.Stream stm = null;
  4. msg.MimeFormatted = true;
  5.  
  6. /* take a html file and try to write an mht */
  7. String path = file.ToString();
  8. Console.WriteLine("{0}", path);
  9. msg.CreateMHTMLBody("file://" + Path.GetFullPath(path), CdoMHTMLFlags.cdoSuppressNone, "", "");
  10. path = path.Replace(".html", ".mht");
  11. stm = msg.GetStream();
  12. stm.SaveToFile(path, ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
  13. msg = null;
  14. stm.Close();
  15.  
  16. convertdir
  17. |-- foo.js
  18. |-- bar.css
  19. |-- htmldir
  20. | |-- plsconvert.html
  21.  
  22. <script src="../foo.js" type="text/javascript" /><script type="text/javascript">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement