tough question

  • Thread starter Thread starter arthurgrajeda
  • Start date Start date
A

arthurgrajeda

The Idea:
Is to have multiple check boxes that are labeled in an access databas
which will allow someone to go to this database, click on any number o
check boxes, click a print button and the corresponding word document
would then print up. These 140 documents would be in a folder.

Is this possible
 
the short answer is yes, this can be very easily done.

probably, you need to investigate the Dir function and the Shel
function.

Use the Dir function to populate a table with the available
documents. Something like this (which populates a listbox with al
files in L:):

Sub refreshlist()
Dim s As String
lReports.RowSource = ""
s = Dir("L:")
Do
If Len(s) Then lReports.RowSource = lReports.RowSource & s & "; " Els
Exit Do
s = Dir
Loop
lReports.Selected(0) = True
End Sub

Then, Loop through the selected ones and use the shell function to ru
word to print the documents. build a statement like
shell "msword.exe " & filename & " /p, vbhide

if the shell statement doesn't handle the looping well, try th
shellwait module by terry kreft (i think avail. at mvps.org/access) t
make it complete each job before continuing.

Hope this at least gets you going in the right direction

aaro
 
Back
Top