
Simple Problem....Want to print files as if from Windows Explorer
Kevin-
Totally without intervention, I don't know,
maybe this will be close enough?
Joe
__________snip____________________________
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const FILE2PRINT = "D:\Programs\ACROREAD\Acrobat.pdf"
Private Sub Command1_Click()
Dim lRetVal As Long
lRetVal = ShellExecute(Me.hwnd, "Print", _
FILE2PRINT, "", "", vbMinimizedNoFocus)
End Sub
_______________snip__________________________
--
***********************************************************
Microsoft Developer MVP- Visual Basic
VB geek at large. (Well, not that large!)
"He preaches well that lives well, quoth Sancho; that's
all the divinity I understand." Miguel de Cervantes
**********************************************************
PS- Please reply to the newsgroup- except in the
case of flames, insults, etc. (Don't bother.)
Quote:
>We have a simple need to input a file name and have that file print out.
>The file is a .pdf file, and I would like it to print out without any
manual
>intervention. We have Acrobat on the system, and it generally opens that
to
>print, which is fine. I'm sure there is a simple solution, I just don't
>know what it is. Any input is greatly appreciated. Thanks.