Question print pdf

jlm722

Registered User.
Local time
Yesterday, 21:30
Joined
Nov 6, 2008
Messages
42
Hello friends, I have searched and searched and can't seem to find a simple answer for my question. I have a form in which i want to place a command button that will simply print a pdf stored on my computer. I want it to simply print it without leaving acrobat reader open etc. I don't want to have to choose printers or other options. Just simply send the pdf to the default printer. I am using access 2000. Thanks in advance. and p.s., I hope I'm not asking in the wrong section. I can't seem to figure out where this falls :o)
 
Mr. Alan, thanks for responding, I have read that post and it's all Greek to me. It makes no sense. They are all over the place with code. :(
 
I have no idea how to directly print the file
If you want to open the PDF you can use this code
Code:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
                   (ByVal hwnd As Long, ByVal lpszOp As String, _
                    ByVal lpszFile As String, ByVal lpszParams As String, _
                    ByVal LpszDir As String, ByVal FsShowCmd As Long) _
                    As Long

 
private sub OpenFile(strFileName as string)
 
Call ShellExecute(0, "Open", strFileName, vbNullString, vbNullString, SW_SHOWNORMAL)
 
end sub

with this code you can open a file (in it's associated application) or folder
 

Users who are viewing this thread

Back
Top Bottom