process

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi i tried using the below to print a document. How do i select the
printername within this process?

With psi1
.Verb = "print"
.WindowStyle = ProcessWindowStyle.Hidden
.FileName = fileName(y)
.UseShellExecute = True
End With
 
notregister said:
Hi i tried using the below to print a document. How do i select the
printername within this process?

You will have to set the system's default printer to the printer that should
be used to print the file before starting the printing operation:

WMI:

<URL:http://groups.google.de/[email protected]>

If you want to use p/invoke, you can find a /VB6/ sample here:

How To Set Which Printer Is the System Default Printer
<URL:http://support.microsoft.com/?id=266767>
 
Back
Top