Printing a pdf with vb6

  • Thread starter Thread starter Desi
  • Start date Start date
D

Desi

Does anyone know what is the code to print a pdf using
vb. Basically I want to create an .exe that when run
will automatically print a particular pdf doument.

Thanks,

Desi
 
* "Desi said:
Does anyone know what is the code to print a pdf using
vb. Basically I want to create an .exe that when run
will automatically print a particular pdf doument.

Depending on the application that is associated with PDF files, you can
try this:

\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.pdf"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///
 
Herfried K. Wagner said:
Depending on the application that is associated with PDF files, you
can try this:

\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.pdf"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///


Yeah, best answer for a VB6 user without sending him away. 8-)
 
Sorry I did not make myself clear. I am using vb6. The
first line is not being accepted - Dim p As New
System.Diagnostics.ProcessStartInfo()

Thanks,

Desi
 
Desi said:
Sorry I did not make myself clear. I am using vb6. The
first line is not being accepted - Dim p As New
System.Diagnostics.ProcessStartInfo()

I hardly dare to say that, but you should better turn to a VB6 group. This
is a VB.NET group. Older versions are handled at microsoft.public.vb.*
 
Back
Top