View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Miller Dave Miller is offline
external usenet poster
 
Posts: 72
Default Excel Macro to Copy Word Text into an Email

I forgot to set the ie object so use this function instead:


Function Get_Body() as string
Dim ie as Object

Set ie = CreateObject("InternetExplorer.Application")

With ie
.visible=True
.navigate "C:\Your File Name.html"
Do Until .ReadyState = 4
Loop
Get_Body = .Document.Body.InnerHTML
.Quit
End With


Set ie = Nothing
End Function