Reputation: 505
I created VBA code that will attach something at the end of every e-mail.
With objItem
.HTMLBody = .HTMLBody & "<p><p>" & TextID
End With
It usually works, but when I generate an e-mail from a meeting (the meeting minutes/summary) it loses its format. I did a test & even a direct .HTMLBody = .HTMLBody
won't keep the format.
My guess is appointment and meeting objects don't have the .HTMLBody
property.
Upvotes: 0
Views: 457
Reputation: 49395
but I detected that, when I generate an e-mail from a meeting (the meeting minutes/summary) it basically loses its format
Appointments (meetings) don't use the HTML based message bodies. Instead, the RTFBody property is available for them. You can use the StrConv
function in Microsoft Visual Basic for Applications (VBA) or Visual Basic to convert an array of bytes to a string.
You can use a low-level on which Outlook is built - Extended MAPI. The PR_HTML property (DASL is http://schemas.microsoft.com/mapi/proptag/0x10130102
) returns the HTML markup unlike the OOM.
But there is a universal solution - use the Word object model for dealing wit message bodies. See Chapter 17: Working with Item Bodies for more information.
Upvotes: 1