View Single Post
  #2  
Old January 21st 07, 11:23 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Outlook HTML.Body

See http://www.outlookcode.com/d/code/htmlimg.htm

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"grahamproctor" wrote in message
...

In VBA (Office 2003), I am trying to create a new email and set the body
text to a saved HTML document but my graphic is not being displayed. I
have used the following combinations of code (each try is commented
out) but without success. If I use .mht and open the email in the
Outbox the graphic appears but when I save and reopen it, it appears as
a placeholder only, not the graphic.

I would appreciate any ideas. Thanks, Graham.

Dim fso As FileSystemObject
Dim ts As TextStream
Dim strText As String

Set fso = CreateObject("Scripting.FileSystemObject")

'Set ts = fso.OpenTextFile("g:\Medics Away\Mailing
Documents\RepplyF.htm", ForReading)
Set ts = fso.OpenTextFile("g:\Medics Away\Mailing
Documents\Repply.htm", ForReading)
'Set ts = fso.OpenTextFile("g:\Medics Away\Mailing
Documents\Repply.mht", ForReading)
'Set ts = fso.OpenTextFile("g:\Medics Away\Mailing
Documents\Repply.mht.doc", ForReading)
'Set ts = fso.OpenTextFile("g:\Medics Away\Mailing
Documents\Repply.htm.doc", ForReading)

strText = ts.ReadAll

mai1.HTMLBody = strText


--
grahamproctor
------------------------------------------------------------------------
grahamproctor's Profile: http://www.officehelp.in/member.php?userid=6171
View this thread: http://www.officehelp.in/showthread.php?t=1325714

Posted from - http://www.officehelp.in



Ads