Sub impressionForm(usf)
Dim x, tbl(), i, texte
x = 0
With CreateObject("WScript.Network")
Set imprimantes = .EnumPrinterConnections
For i = 0 To imprimantes.Count - 1
If InStr(LCase(imprimantes(i)), "pdf") > 0 Then ReDim Preserve tbl(0 To x): tbl(x) = imprimantes(i): texte = texte & x & "--" & imprimantes(i) & vbCrLf: x = x + 1
Next
i = InputBox("choissisez une imprimante " & vbCrLf & texte, "impression userform")
If i <> "" Then
.SetDefaultPrinter tbl(Val(i))
usf.printform
End If
End With
End Sub