This don't work in Outlook 2002?

  • Thread starter Thread starter George Hester
  • Start date Start date
G

George Hester

Sub TestReadHTML(ieDoc As String)
Dim ieApp As SHDocVw.InternetExplorer
Dim webDoc As Object
Dim ol As New Outlook.Application
Dim str As String
Dim itm As MailItem

Set ieApp = CreateObject("InternetExplorer.Application")
ieApp.Visible = True
ieApp.navigate ieDoc
Set webDoc = ieApp.document
Set itm = ol.CreateItem(0)
itm.HTMLBody = webDoc.documentElement.outerHTML
itm.InternetCodepage = 1253
Debug.Print itm.HTMLBody
itm.Display
End Sub
 
The outlook object model is limited when running in a browser for security
reasons.

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp

This posting is provided "AS IS" with no warranties, and confers no rights.



Sub TestReadHTML(ieDoc As String)
Dim ieApp As SHDocVw.InternetExplorer
Dim webDoc As Object
Dim ol As New Outlook.Application
Dim str As String
Dim itm As MailItem

Set ieApp = CreateObject("InternetExplorer.Application")
ieApp.Visible = True
ieApp.navigate ieDoc
Set webDoc = ieApp.document
Set itm = ol.CreateItem(0)
itm.HTMLBody = webDoc.documentElement.outerHTML
itm.InternetCodepage = 1253
Debug.Print itm.HTMLBody
itm.Display
End Sub
 
Actually I got it to work.

The probkem was here ieApp.navigate ieDoc

ieDoc must be in URL form. and changed navigate to location.
 
Back
Top