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-)
 
Armin,

You got it, did you think that when I do that, that it is an accident?

:-)

Cor
 
Cor said:
Armin,

You got it, did you think that when I do that, that it is an
accident?

:-)

I only think it is just as useless for him as Herfried's answer. ;)
 
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.*
 
* "Armin Zingler said:
Yeah, best answer for a VB6 user without sending him away. 8-)

Sorry, I often forget to read the subject lines...

;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top