Append text to (formatted) body of Reply

  • Thread starter Thread starter Mark Parent
  • Start date Start date
M

Mark Parent

My VBA code is properly finding and opening emails that I want to reply to,
but the body of these messages is formatted somewhat with a table and some
bordering.

I want to append some text to the bottom of this outgoing reply via my code,
but using objItm.Body = objItm.Body & chr(13) & newstring
seems to be removing all the formatting. I can send the reply (with its
formatting) just fine when I manually add text to the bottom, but I can't
seem to replicate this through my code. If can understand the line above
concatenating newstring might be forcing the body to text; is there a coding
way to position the cursor after the existing text and add text without
affecting the existing formatting?
 
You woudl need to set the HTMLBody propretty instead of Body.
Read the old value of HTMLBody, find the position of the "</body", inset
your own value just before that, set the new value of HTMLBody

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Thank You Dmitry... That's put me on the right track, and I've been able to
produce a much better looking outgoing email.
 
Back
Top