Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* make new message object */
- Message msg = new MessageClass();
- ADODB.Stream stm = null;
- msg.MimeFormatted = true;
- /* take a html file and try to write an mht */
- String path = file.ToString();
- Console.WriteLine("{0}", path);
- msg.CreateMHTMLBody("file://" + Path.GetFullPath(path), CdoMHTMLFlags.cdoSuppressNone, "", "");
- path = path.Replace(".html", ".mht");
- stm = msg.GetStream();
- stm.SaveToFile(path, ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
- msg = null;
- stm.Close();
- convertdir
- |-- foo.js
- |-- bar.css
- |-- htmldir
- | |-- plsconvert.html
- <script src="../foo.js" type="text/javascript" /><script type="text/javascript">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement