1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Open "Historique.txt" For Append Shared As #f
If FileLen("Historique.txt") = 0 Then
Print #f, "Affaire :", Cells(6, 6), "N°", Cells(8, 6)
End If
Print #f, ""
Print #f, "Rapport de diffusion du : ", Format(Now(), "dd/MM/yyyy"), " à ", Format(Now(), "hh:mm:ss")
For j = 1 To 15
If Cells(17 + j, 2).Value <> "" Then
Print #f, "Plan N°", Cells(17 + j, 2).Value, Cells(17 + j, 3).Value, Cells(17 + j, 5).Value, "Indice", Cells(17 + j, 7).Value, "du", Format(Cells(17 + j, 8).Value, "dd/MM/yyyy")
End If
For k = 1 To 12
If Cells(17 + j, 8 + k).Value <> "" Then
Cells(6, 23).Value = k
Print #f, " Diffusé à ", Cells(8, 10), "en", Cells(17 + j, 8 + k).Value, "exemplaires"
End If
Next
Cells(6, 23).Value = ""
Next
Close #f |
Partager