I have my messages loaded in a MailItem object. No problem there.
I can load the HTML content and the regular content in a string and have my browser navigate to that string.
The trouble is that either the entire page doesn't display correctly (layout-wise, i.e. no spaces, tabs, alinea's etc.) or cuts off the page.
What can I do to display it correctly ?
the code :
VB Code:
Public objOutlook As New Outlook.Application Public objNameSpace As Outlook.NameSpace Public objInbox As MAPIFolder Public objMail As MailItem Public tekst As String Public strHTML As String Public Sub LoadInbox2() 'this is called in the logon procedure, i.e. I log on and then this Set objNameSpace = objOutlook.GetNamespace("MAPI") Set objInbox = objNameSpace.GetDefaultFolder(olFolderInbox) With objInbox For intI = 1 To objInbox.Items.Count Set objMail = objInbox.Items(intI) tekst = objMail.SenderName & " " & objMail.CreationTime &_ " " & objMail.ReceivedTime & " " & objMail.Subject lstMessages.AddItem tekst Next intI End With End Sub Private Sub lstMessages_Click() Set objMail = objInbox.Items(lstMessages.ListIndex + 1) strHTML = "about:<HTML>" & objMail.HTMLBody & objMail.Body & "</html>" brwMessages.Navigate strHTML '<---- here it goes wrong somehow End Sub
Any suggestions ? Did I leave something out ? Forget something ?




Reply With Quote