Read MHTML document from Macro

S

Satish

Hi All,

I need to write a macro in which I am required to open a MHTML file
and read its contents. I am currently using the following code -

file_name = sPath & "\" & file.Name 'I am able to get the
name of the file correctly in file.Name
Open file_name For Input As #1
Do While Not EOF(1)
Input #1, Mystring
If InStr(1, Mystring, "<TD bgColor=#cae3e3><B>") <> 0
Then
MsgBox Mystring
End If
Loop

I am not able to figure out from where exactly does the value in
Mystring gets populated from. I tried doing "view source" in IE on
the mht file, but it doesn't exactly read all the contents from
there.

Any pointers??

Thanks much!
Satish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top