Simple Problem....Want to print files as if from Windows Explorer 
Author Message
 Simple Problem....Want to print files as if from Windows Explorer

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.


Sun, 24 Dec 2000 03:00:00 GMT  
 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.



Sun, 24 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help with simple VB ap - How to open Windows Explorer -

2. Help with simple VB ap - How to open Windows Explorer -

3. Problems when repeatedly reading a file across a simple Windows network

4. Problems when repeatedly reading a file across a simple Windows

5. Problems when repeatedly reading a file across a simple Windows net

6. Doubleclick a file in Windows Explorer, start my program opening that file

7. Print like windows explorer

8. Need Information - Explorer Bar like in Windows Explorer/Outlook Express

9. Problem SHELLing to Windows Explorer causing Share Violation

10. How make web files visible in windows explorer?

11. Opening files from windows explorer ????

12. Dragging files or folders from my application into Windows Explorer

 

 
Powered by phpBB® Forum Software