# Print multiple tif files using VBA



## Bruno_x (Oct 20, 2004)

Once a week I need to print multiple (from 2 to 75 and more) tif files stored on my HD

_The files are all named in this way : xxxxx-yy.tif
where xxxxx is a 5 character number and y is the pagenr.
example :  01254-1.tif,  01254-2.tif,..., 01254-12.tif_

For the moment I use some VBA code to filter the tif-names, I import the selected files and print them. (=quite slow)

My question : is there a way to print the files *directly* to the printer instead of import & print ?

I'm looking for an alternative in VBA for this :  http://www.anzio.com/support/documentation/printwizprog.htm
_(this Print Wizard only prints text-based files)_


----------



## Bruno_x (Oct 22, 2004)

After a few more hours  try & error,  I  found this solution :

_ ShellExecute 0, "Print", "D:\Certif\01501-2.tif", "", "", 1_
No, this is not the solution, this will let you view the tif file, not printing it ...

Can I use _Shell_ ? 
Is there a program that accept command line options ? and... 
yes, IrfanView accept command line options and one of them is * /print*.

the next code will do the trick :
Shell "C:\Programs\IrfanView\i_view32.exe D:\Certif\01501-*.* /print", 1

Maybe this is usefull to someone else...


----------

