-
Notifications
You must be signed in to change notification settings - Fork 8
Page1 Test
KofaxRPA edited this page Jun 11, 2019
·
1 revision
Public Sub Subfields_Sort(subfields As CscXDocSubFields, Comparer As ComparerDelegate)
'Sort subfields using a comparer
'we have to copy the subfields to an array, sort the array and then copy back to the subfields
Dim sfs() As CscXDocSubField, s As Long
ReDim sfs(subfields.Count-1)
For s=0 To subfields.Count-1
Set sfs(s)=subfields(s)
Next
Array_Sort(sfs, Comparer)
subfields.Clear
For s =0 To UBound(sfs)
Field_Copy(sfs(s),subfields.Create(CStr(s)))
Next
End Sub```