Sub Demo()
Const SEP = "\" & vbCrLf
With Feuil1
F& = .Cells(.Rows.Count, 1).End(xlUp).Row: If F < 7 Then Beep: Exit Sub
S$ = "FV=" & .[E2].Value & vbCrLf & "FA=" & .[E3].Value & vbCrLf & _
"FR=" & .[E4].Value & vbCrLf & "OT=" & .[E5].Value & vbCrLf & "OR=\" & vbCrLf
For R& = 7 To F
S = S & "LP=" & .Cells(R, 1).Value & SEP & "LQ=" & .Cells(R, 2).Value & SEP
Next
End With
S = S & "FM=ENDORD" & SEP & "FM=END" & SEP
F = FreeFile
Open ThisWorkbook.Path & "\Export.txt" For Output As #F: Print #F, S;: Close #F
End Sub