Framework EDI Reference. Methods and Properties
ediDataElements. First

Gets the first data element in the collection.

Syntax:

Returns

Returns an object of type FREDI.ediDataElement.

Example

Dim oDataElement As Fredi.ediDataElement
Dim oComposite As Fredi.ediDataElement
Dim oAllElements As Fredi.ediDataElements
Dim oDataSegment As Fredi.ediDataSegment

....

' Get first data segment in document.
Set oDataSegment = oEdiDoc.FirstDataSegment

' Get the composite element.
Set oComposite = oDataSegment.GetDataElementByPos("\ISA\GS\ST\PO1\SLN\SLN<C001>")

' Get the object containing the collection of sub elements.
Set oAllElements = oComposite.DataElements

' Get the first element in the collection.
Set oDataElement = oAllElements.First

MsgBox "First element in the collection is " & oDataElement.ID

Sample

M_First.zip