Código:
Public Sub ExportDBTableToText2(rs As Recordset, TextFile As String) Dim FieldCount As Integer Dim i As Integer Dim tmp As String Open TextFile For Append As #1 Do Until rs.EOF tmp = rs.GetString(adClipString, , "|", "|" & vbCrLf) If rs.EOF Then tmp = Left$(tmp, Len(tmp) - 1) End If Print #1, tmp Loop Close #1 End Sub
y esta otra funcion :
Código:
El problema esta que el archivo que genera tiene al final saltos de lineas innecesarios, yo solo deseo que se use salto de linea para separar renglones al final no es necesario ningún salto de linea.. alguna idea ?.. gracias Public Sub ExportDBTableToText3(rs As Recordset, TextFile As String) Dim FieldCount As Integer Dim i As Integer Open TextFile For Append As #1 Print #1, rs.GetString(adClipString, , "|", "|" & vbCrLf) Close #1 End Sub