Framework EDI Reference. Methods and Properties
mailMessage. ProcessEdi

Processes EDI data in a MIME message.

Syntax:

Returns:

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

Remarks:

The message must, at a minimum, conform to the following:

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oSchemas As Fredi.ediSchemas
Dim oSchema As Fredi.ediSchema
Dim oMailDocument As Fredi.mailDocument
Dim oMessage As Fredi.mailMessage

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

' Disable standard reference library.
Set oSchemas = oEdiDoc.GetSchemas
oSchemas.EnableStandardReference = False

' Load the schema that the EDI file will use.
Set oSchema = oEdiDoc.LoadSchema(App.Path & "\ASCX12_850.SEF", Schema_Standard_Exchange_Format)

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

' Disable auto-processing so that message can be read as is.
oMailDocument.Option(MailDocOpt_Auto) = 0

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

' Get the message.
Set oMessage = oMailDocument.GetMessage

' Process EDI message.
oMessage.ProcessEdi

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

MsgBox "Done"

Sample

M_ProcessEdi.zip

See Also.

RFC 1767 - MIME Encapsulation of EDI Objects