Printing files from folders

L

Linc

Does any one here know how to print files from a folder in VBA?

I have a button on a form (in Access) that when clicked it goes out and
finds all the
files in a particular folder that pertain to that form's id. That's no
problem. But...

Once it's found all the files, I want to print each file. I can write the
loop, but I can't find the right command word to make them print. Help!

Dim i As Integer
For i = 1 To .FoundFiles.count
'Print each file
'Print .FoundFiles(i) <---- What is this line supposed to be?????
Next i
 
D

DL

Are you printing forms or reports that your Access db has created or have
these files been created elsewhere?

Perhaps see Access VBA: Print Method
Or post to one of the Access specific ng's on the, msnews.microsoft.com,
news server
 
L

Linc

Thank you for your response. I want to print Adobe files that sit in a
folder that have the same ID as on my Access form.

FYI, I posted this question in several places and it turns out the command I
was searching for was ShellExecute. You can use this to either open or print
a file in a folder without knowing what application it belongs to. A very
useful command!

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