Impression en noir et blanc

Résolu
mathew_bitshy Messages postés 11 Date d'inscription mardi 30 mars 2004 Statut Membre Dernière intervention 11 juillet 2005 - 20 mai 2005 à 11:55
mathew_bitshy Messages postés 11 Date d'inscription mardi 30 mars 2004 Statut Membre Dernière intervention 11 juillet 2005 - 20 mai 2005 à 16:19
Bonjour à tous,
J'essaye d'imprimer une Form en noir et blanc.
J'arrive à modifier l'orientation avec : Printer.Orientation = cdlLandscape (ou cdlPortrait)
Cela fonctionne correctement.
Mais lorsque je veux paramétrer le mode d'impression avec : Printer.ColorMode = vbPRCMMonochrome
ceci n'est pas pris en compte : la Form est toujours imprimée en couleur.
Est-ce que quelqu'un aurait des idées la dessus ? (L'utilise le composant CommonDialog)

Merci d'avance

Voici la partie de mon code :

Private Sub CommandButton1_Click()


On Error GoTo fin
CommonDialog1.CancelError = True
CommonDialog1.ShowPrinter
'Orientation de la page
If CommonDialog1.Orientation = cdlLandscape Then
Printer.Orientation = cdlLandscape
Else
Printer.Orientation = cdlPortrait
End If
'Couleur ou noir&blanc
Printer.ColorMode = vbPRCMMonochrome
Me.PrintForm
Historique.Visible = True
fin:

End Sub

2 réponses

mathew_bitshy Messages postés 11 Date d'inscription mardi 30 mars 2004 Statut Membre Dernière intervention 11 juillet 2005
20 mai 2005 à 16:19
En fait d'après certains, ca foire qu'avec des imprimante HP.
La seule solution que j'ai trouvé est de faire une seconde Form identique à celle ci mais en noir et blanc.
Et ensuite lorsque la personne veut imprimer en noir et blanc elle imprime la seconde Form qui est en noir et blanc.
3
greg38bj Messages postés 83 Date d'inscription jeudi 11 mars 2004 Statut Membre Dernière intervention 17 novembre 2008
20 mai 2005 à 16:13
Chez moi ça marche comme ça ...

Private Sub CommandButton1_Click()
On Error GoTo fin
CommonDialog1.CancelError = True
CommonDialog1.ShowPrinter
'impression noir et blanc
Printer.ColorMode = vbPRCMMonochrome
'qualité d'impression
Printer.PrintQuality = 160
'Orientation de la page
If CommonDialog1.Orientation = cdlLandscape Then
Printer.Orientation = cdlLandscape
Else
Printer.Orientation = cdlPortrait
End If
Me.PrintForm
Historique.Visible = True
fin:

End Sub
0
Rejoignez-nous