' Produit un fichier avec les combinaisons des lettres de 4 mots
Const ForReading = 1, ForWriting = 2, ForAppending = 8
mot1 = "Durand"
mot2 = "Dupuy"
mot3 = "Martin"
mot4 = "Laurent"
Set fso = CreateObject("Scripting.FileSystemObject" )
Set f_out = fso.OpenTextFile("mix4.txt", ForWriting, true)
For i = 1 To Len(mot1)
c1 = Mid(mot1, i, 1)
For j = 1 To Len(mot2)
c2 = Mid(mot2, j, 1)
For k = 1 To Len(mot3)
c3 = Mid(mot3, k, 1)
For l = 1 To Len(mot4)
c4 = Mid(mot4, l, 1)
f_out.WriteLine c1 & c2 & c3 & c4
Next
Next
Next
Next
f_out.Close |