Framework EDI Reference. Methods and Properties
mailMessage. PutEdi

Puts the entire output of the EDI document, currently loaded, into the body of the message.

Syntax:

Parameters:

Returns

Returns 1 if the operation is successful; otherwise returns 0 if the operation fails.

Remarks

An EDI document has to have previously been loaded using the method LoadEdi available in the top level objects: ediDocument, xmlDocument and mailDocument.

 

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oMessage As Fredi.mailMessage

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

' Load EDI document.
oEdiDoc.LoadEdi App.Path & "\SampleEdi.X12"

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

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

' Get top level message of the document.
Set oMessage = oMailDocument.GetMessage

' Write the EDI content to the message body.
oMessage.PutEdi

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

MsgBox "Done"

Samples