VBA macro help please?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a check box. When you select the check box it runs a RunApp macro to open Adobe Reader and a pdf file. What I would really like to happen, is when you select the checkbox that the RunApp macro would run behind the scenes, basically transparent, that would run Adobe open the pdf and print the pdf to their local printer. Steve Schapel (Access MVP) has helped me with the macros but can't help me with the printing option. Can anyone help
 
try this:

Sub test()
Dim strShellCall As String
Dim strAcrobatPath As String
Dim strFileName As String
strAcrobatPath = "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe"

strFileName = "C:\MyPdfFile.pdf"

strShellCall = """" & strAcrobatPath & """" & " /p /h " & """" & strFileName
& """"

Call Shell(strShellCall, vbNormalFocus)

End Sub


BradleyJ said:
I have a form with a check box. When you select the check box it runs a
RunApp macro to open Adobe Reader and a pdf file. What I would really like
to happen, is when you select the checkbox that the RunApp macro would run
behind the scenes, basically transparent, that would run Adobe open the pdf
and print the pdf to their local printer. Steve Schapel (Access MVP) has
helped me with the macros but can't help me with the printing option. Can
anyone help?
 
Back
Top