Advertisement
Advertisement
| 04.15.2008 at 06:41AM PDT, ID: 23323637 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: |
' Write Field Names in the First Row
FieldTitle = Replace(Ucase(KeyFields), ",", Separator) & VbCrLf
x = WriteFile(OutFile, FieldTitle)
AddCount = 0
For i = 0 to fc - 1
res.GetNthDoc(i)
AddCount = AddCount + 1
If AddCount mod ReportStep = 0 Then
msg("> records processed: [" & Padz(AddCount, 8) & "]")
If Right(blob, 1) = VbCrLf Then Blob = Left(blob, len(blob)-1)
AppendtoFile OutFile, blob
blob = ""
End If
fullpath = res.DocDetailItem("_filename")
fBlob = ReadFile(fullpath)
'RefNo = res.DocDetailItem("ref_no")
parts = Split(KeyFields, ",")
for each p in parts
val = XMLField(fBlob, p, False)
FieldLine = FieldLine & val & Separator
Next
fBlob = ""
If Right(FieldLine, 1) = Separator Then FieldLine = Left(FieldLine, Len(FieldLine)-1)
blob = blob & FieldLine & VbCrLf
FieldLine = "": val = ""
Next
|