PDA

View Full Version : Print PDF file



bryVA
08-17-2009, 09:32 AM
Hello all,

I have a listbox on a userform that the user can select multiple selections which are PDF forms which the PDF files are located in the same folder as this excel file. I need it to go through the selections in the listbox and print the PDF forms that the user selected. Does anybody know how to do this?

Something Like this:

Dim lItem As Long
For lItem = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(lItem) = True Then
'PRINT PDF FILE
End If
Next

Thanks all for your help,

-B

bryVA
08-20-2009, 01:34 PM
Nobody can help me? Can this not be done?

Thanks all,

-B

mdmackillop
08-20-2009, 03:00 PM
select multiple selections which are PDF forms
I don't understand this. Can you clarify?

bryVA
08-21-2009, 06:11 AM
Sorry about being unclear. I Have a listbox that I can select more than one selections and I want to be able to have those selections print the PDF form for which they correspond with. The name in the listbox is the name of the PDF file. So I want the macro to go through each item in the listbox and if it has been selected to print the corresponding PDF file.

I hope I was able to explain this better.

Thank you for all your help,

-B

mdmackillop
08-21-2009, 06:46 AM
Private Sub ListBox1_Click()
Dim Pth As String
Pth = "C:\AAA\"
Shell "c:\program files\adobe\reader 9.0\reader\acrord32.exe /p /h " & Pth & ListBox1
End Sub