Results 1 to 1 of 1

Thread: Help on Webbrowser content layout [Resolved ... thank you]

  1. #1

    Thread Starter
    Junior Member DWillems's Avatar
    Join Date
    Aug 2001
    Location
    Lunar Base 1 Favorite drink : olive oil Mental state : abstract
    Posts
    28

    Help on Webbrowser content layout [Resolved ... thank you]

    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:
    1. Public objOutlook As New Outlook.Application
    2. Public objNameSpace As Outlook.NameSpace
    3. Public objInbox As MAPIFolder
    4. Public objMail As MailItem
    5. Public tekst As String
    6. Public strHTML As String
    7.  
    8. Public Sub LoadInbox2()
    9. 'this is called in the logon procedure, i.e. I log on and then this
    10. Set objNameSpace = objOutlook.GetNamespace("MAPI")
    11. Set objInbox = objNameSpace.GetDefaultFolder(olFolderInbox)
    12. With objInbox
    13. For intI = 1 To objInbox.Items.Count
    14.    Set objMail = objInbox.Items(intI)
    15.    tekst = objMail.SenderName & "  " & objMail.CreationTime  &_
    16.    "  " & objMail.ReceivedTime & "   " & objMail.Subject
    17.    lstMessages.AddItem tekst
    18. Next intI
    19. End With
    20. End Sub
    21.  
    22. Private Sub lstMessages_Click()
    23. Set objMail = objInbox.Items(lstMessages.ListIndex + 1)
    24. strHTML = "about:<HTML>" & objMail.HTMLBody & objMail.Body & "</html>"
    25. brwMessages.Navigate strHTML '<---- here it goes wrong somehow
    26. End Sub

    Any suggestions ? Did I leave something out ? Forget something ?
    Last edited by DWillems; Dec 7th, 2001 at 06:57 AM.
    General Protection Fault : An error occured while executing Error #3051 : undocumented error. Please wait while your computer crashes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width