Framework EDI Reference. Methods and Properties
ediInterchange. Save

Saves the Interchange into an external file.

Syntax:

Parameters:

Returns

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

Remarks

The data saved to the file begins with the Interchange Control Header and ends with the Interchange Control Trailer.

ASC/X12

UN/EDIFACT

 

Example

Dim oEdiDoc As ediDocument
Dim oSchema As ediSchema
Dim oInterchange As ediInterchange
Dim sEdiFile As String
Dim sSefFile As String
Dim sOutput As String

sEdiFile = App.Path & "\850.X12"
sSefFile = App.Path & "\850.SEF"
sOutput = App.Path & "\Interchange.OUT"

Set oEdiDoc = New ediDocument
Set oSchema = oEdiDoc.LoadSchema(sSefFile, 0)

oEdiDoc.LoadEdi sEdiFile

' Get Interchange from document
Set oInterchange = oEdiDoc.FirstInterchange

' Save interchange output
oInterchange.Save sOutput