Framework EDI Reference. Methods and Properties
mailMessage. BodyText

Sets or gets the text content of the body of the message.

Syntax:

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oMessage As Fredi.mailMessage
Dim oMessages As Fredi.mailMessages
Dim oFirstBody As Fredi.mailMessage

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

' Load the mail document containing the EDI data.
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get the top message.
Set oMessage = oMailDocument.GetMessage

' Get the collection of sub messages of the message
Set oMessages = oMessage.GetMessages

' Get the first body.
Set oFirstBody = oMessages.GetMessage(1)

' Modify the text.
oFirstBody.BodyText = "The quick brown fox jumps over the lazy dog" & vbCrLf

oMailDocument.Save App.Path & "\Output.TXT"

MsgBox "Done"

Samples