Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Selectionner une Imprimante.

1 réponse
Avatar
Hotmerlino
Bonsoir a tous,

J'ai develloper un programme de KPI (Key Performance Input) pour la societe.
Je dois envoyer certains resultats a des services differents.
Comment selectionner une imprimante bien precise?
Ex.: j'ai +/- 10 imprimantes installees sur mon PC,
La direction: PRT DIRE
Le sercie vente : PRT VENTE
Le service administration : PRT ADMIN
......

Comment selectionner la bonne imprimante dans mon programme pour imprimer
les KPI qui corespondes au bon service?

Merci de votre aide.

Salva

1 réponse

Avatar
Jean-marc
Hotmerlino wrote:
Bonsoir a tous,

J'ai develloper un programme de KPI (Key Performance Input) pour la
societe. Je dois envoyer certains resultats a des services differents.
Comment selectionner une imprimante bien precise?
Ex.: j'ai +/- 10 imprimantes installees sur mon PC,
La direction: PRT DIRE
Le sercie vente : PRT VENTE
Le service administration : PRT ADMIN
......

Comment selectionner la bonne imprimante dans mon programme pour
imprimer les KPI qui corespondes au bon service?

Merci de votre aide.

Salva



Hello,

Tout simple, voici un tout petit bout de code qui montre
comment faire:

Private Sub Command1_Click()
Dim i As Long

' Affiche la liste des imprimantes
For i = 0 To Printers.Count - 1
Debug.Print Printers(i).DeviceName
Next i

' Assigne par exemple l'imprimante 3
Set Printer = Printers(3)

' Et envoie des choses
Printer.Print "Coucou"
Printer.EndDoc

End Sub


Bonne suite!

--
Jean-marc Noury (jean_marc_n2)
Microsoft MVP - Visual Basic
FAQ VB: http://faq.vb.free.fr/
mailto: remove '_no_spam_' ;