Shell Acrobat Issues

C

Craig

I'm using Access 2003....

I have a little script to loop through a table of PDF filenames and print
out the PDF files. I'm confused with the switches and don't know how to use
them...

My code is:

Private Sub cmdPrint_Click()
Dim strName As String
Dim sAcrobatReaderExe As String

With Me!lbxGetFileSpecs '(Get all selected items in listbox)
For Each varItem In .ItemsSelected
strName = .Column(1, varItem)
sAcrobatReaderExe = "C:\Program Files\Adobe\Acrobat 7.
\Acrobat\Acrobat.exe"
retval = Shell(sAcrobatReaderExe & " /h " & Chr(34) & strName &
Chr(34), 0)
Next varItem
End With
End Sub

My question is what does the " /h " do? I've also seen " /p " and " /t "
switches. Can anyone enlighten me as to what they do?

My experience shows me that " /p " opens up Acrobat, then pauses at the
print screen, forcing me to hit the "print" button for each pdf file selected
(not efficient).

I need all pdf files selected to be printed (ie, Acrobat opens, each pdf
file is printed, then Acrobat is closed).

How can I accomplish this?

Thanks.
 
A

Albert D. Kallal

My question is what does the " /h " do? I've also seen " /p " and " /t "
switches. Can anyone enlighten me as to what they do?

Well, just as suggestion, did you try the adobe groups? After all, I not
sure that command line switches questions about adobe has ANY relationship
to ms-access, or belongs in this newsgroup.

I believe /t is to print, and /h is to keep the window hidden
(or at least not maximize).
I need all pdf files selected to be printed (ie, Acrobat opens, each pdf
file is printed, then Acrobat is closed).

My experience is that adobe stays in memory after the first shell command
when using /h /t
(that means the load time should not be much of of a problem - after the
first load anyway). So I assume using /t and /h should print for you
without prompts. (/t = print without prompt).
How can I accomplish this?

Try my above suggestion. If that don't work, then give the Adobe support
groups a try and see what they can come up with...
 
C

Craig

Appreciate the response...

I queried this newsgroup before I submitted my question and found others who
were interested in doing something similar. I wanted to create a form that a
user could use to collect and print pdf files and Access would be the best
route - that's the relationship to Access...

I'll bookmark the Adobe groups, though. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top