Framework EDI Reference. Methods and Properties
mailDocument. Process

Processes the document that has already been loaded.

Syntax:

Returns

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

Remarks

When a message is loaded using the Load method, it is automatically processed by default and so this method does not need to be called. However, one can load a message and prevent it from being processed by disabling the MailDocOpt_Auto option. If this is the case, the already loaded message can then be processed by calling the Process method.

Processing a message

When a message is being processed, it undertakes the following:

Note that before this method is called, all configurations required for processing the ediDocument (example load schema, cursor types, etc.) should have already been set in the ediDocument object.  Example,

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

' Disable standard reference library.
Set oSchemas = oEdiDoc.GetSchemas
oSchemas.EnableStandardReference = False
Set oSchema = oEdiDoc.LoadSchema(App.Path & "\ASCX12_856.SEF", Schema_Standard_Exchange_Format)

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

' Load the mail document containing the EDI data.
oMailDocument.LoadEdi App.Path & "\Sample_856.X12"

NOTE: The MailDocOpt_Auto option has no effect on the Process method.