In Windows Explorer if you right click on a file (say a pdf or txt) there is an option to Print. Now Windows does this without opening the coresponding program (Acrobat or Notepad).
Is there a way to simulate that useing VB?
Thank you in advance.
Printable View
In Windows Explorer if you right click on a file (say a pdf or txt) there is an option to Print. Now Windows does this without opening the coresponding program (Acrobat or Notepad).
Is there a way to simulate that useing VB?
Thank you in advance.
You can do the same thing using the followng API:
Code:Private Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (ByVal hdc As Long, lpdi As DOCINFO) As Long
Private Declare Function StartPage Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function EndPage Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function EndDoc Lib "gdi32" (ByVal hdc As Long) As Long