Below seemed to work for me.
Sub Main()
Dim inputfile As String = "c:\6.mht"
FixMht(inputfile)
End Sub
Private Sub FixMht(ByVal tempFileName As String)
Dim all As String = File.ReadAllText(tempFileName)
Dim last As Integer = all.LastIndexOf("------=_NextPart_000_00")
Dim newall As String = all.Remove(last)
Dim builder As New StringBuilder
builder.Append(newall)
builder.Append("------=_NextPart_000_00--")
File.WriteAllText(tempFileName, builder.ToString, Encoding.UTF8)
End Sub
Showing posts with label MHT. Show all posts
Showing posts with label MHT. Show all posts
Friday, June 19, 2015
Wednesday, April 1, 2015
create MHT
https://code.msdn.microsoft.com/windowsdesktop/Creating-a-MHTML-MIME-HTML-61cf5dd1
http://stackoverflow.com/questions/9999876/generate-mht-file-programmatically
http://stackoverflow.com/questions/9999876/generate-mht-file-programmatically
MHT to PDF
http://raywoodcockslatest.blogspot.com/2012/01/windows-7-batch-printing-html-mht-files.html
http://www.print-conductor.com/news/batch-print-mht.html
http://www.print-conductor.com/news/batch-print-mht.html
Subscribe to:
Posts (Atom)