Framework EDI Reference. Methods and Properties
mailBody.Export
Exports the content of the body to an external file.

Syntax:

 Parameters:

 Returns:

Returns 1 if the operation is successful; otherwise the operation returns zero.

 Remarks:

If the file does not exist, it is created containing the exported data.  If file already exists, the file is overwritten without warning and the file will contain the exported data.

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oSubMsg As Fredi.mailMessage
Dim oBody As Fredi.mailBody

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

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

' Load EDI document normally.
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get subject message
Set oSubMsg = oMailDocument.GetMessage

' Get subject message body
Set oBody = oSubMsg.GetBody

' Export body contents
oBody.Export App.Path & "\Output.TXT"

MsgBox "Done"

Samples