ProcessStartInfo Impression

ProcessStartInfo Impression - VB/VBA/VBS - Programmation

Marsh Posté le 19-07-2006 à 18:12:53    

Bonjour,
j'ai une application vb.net qui arrive à imprimer des pdf grâce au code suivant:
 
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.Verb = "print"
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.FileName = "c:\test.pdf"
Process.Start(psi)
 
Cette opération imprime les fichiers pdf sur l'imprimante par défaut. Mais je voudrai lui donner en paramètre l'imprimante.
Je pense qu'il faut le préciser dans psi.arguments mais je n'arrive pas à trouver la bonne syntaxe (si c'est le bon endroit).
 
Si quelqu'un peut m'aider,
merci
 
deck10

Reply

Marsh Posté le 19-07-2006 à 18:12:53   

Reply

Marsh Posté le 21-07-2006 à 02:07:26    

RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "printer name"
 
ca change l'imprimante par défaut ...
 
trouvé ici :
http://forums.devx.com/showthread.php?p=425418

Reply

Marsh Posté le 24-07-2006 à 12:22:23    

merci,
je vais le tester

Reply

Marsh Posté le 24-07-2006 à 15:02:02    

Sous quel format faut il mettre le nom de l'imprimante ? car quand je veux executer cette ligne, il me dit "imprimante inconnue" :(

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed