Sets or gets the segment terminator used by the document.
Syntax:
Remarks
The SegmentTerminator property specifies the string that separates the data segments in an EDI document.
- EDIFACT – The data segment terminator must be specified explicitly before loading the EDI document, otherwise the document will not be properly translated and an error will be generated. However, if a UNA service segment is specified then the data segment terminator specified in the UNA segment will be used instead. Also, if syntax levels are defined and the document references one of the predefined syntax level then the data segment terminator defined in the syntax level will be used. If auto-detect is disabled, the data segment must be specified regardless because neither the information in the UNA service segment nor the defined syntax level will be used.
- X12 – The segment terminator is automatically detected. However, if the auto-detect property is disabled then the delimiter must be specified, otherwise the document will not be translated properly or an error will be generated.
Example
Set oEdiDoc = New Fredi.ediDocument
oEdiDoc.SegmentTerminator = "~" & vbCrLf
oEdiDoc.ElementTerminator = "*"
oEdiDoc.CompositeTerminator = ">"