ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing non-excel files from excel (https://www.excelbanter.com/excel-programming/361374-printing-non-excel-files-excel.html)

Peter[_21_]

Printing non-excel files from excel
 
Hello everyone,



I have an Excel file that exports attachments from emails in a particular
Outlook-folder to a folder on a hard-drive, makes a list of files in the
latter, but then...



I'd like to use the list of files that was devised by Excel to be printed in
the order of that same list.



I know, I know, I could have the Exporer-window open, showing the
destination folder, select all files pressing Ctrl+A, right-click the bunch,
select Print from the contextmenu and they would all be printed. But I
wouldn't be an all-purpose Excel fanatic if I weren't looking for that final
piece of craftsmanship that could make Excel print those files from my list,
already on-screen. Besides, doing what I've just described would not
necessarily mean the files would be printed in the order of the Excel list.
Which means that having a perfectly sorted order of files to be printed
would nonetheless still include: me, sitting behind a desk, (litterally)
sorting things out. Not if I can help it. Or would that be ... Not if you
can help it.?





Example:



Folder on hard-drive (=destination): D:\Scans to be handled



Files within that folder:

823000.pdf

823001.pdf

823002.tif

823003.tif

823004.tif

823005.pdf

823006.pdf

823007.pdf

823008.tif

823009.tif

823010.tif





I'd like our printer to print these files in the order mentioned above. I
use Acrobat Reader for the pdf files and some kind of KODAK viewer for the
..tif files.



Thanks in advance for your kind help.



Peter





NickHK

Printing non-excel files from excel
 
Peter,
What about the ShellExecute/ShellExecuteEx APIs with the "print" verb ?
Depends what the default app are for these file types on your system.

NickHK

"Peter" wrote in message
...
Hello everyone,



I have an Excel file that exports attachments from emails in a particular
Outlook-folder to a folder on a hard-drive, makes a list of files in the
latter, but then...



I'd like to use the list of files that was devised by Excel to be printed

in
the order of that same list.



I know, I know, I could have the Exporer-window open, showing the
destination folder, select all files pressing Ctrl+A, right-click the

bunch,
select Print from the contextmenu and they would all be printed. But I
wouldn't be an all-purpose Excel fanatic if I weren't looking for that

final
piece of craftsmanship that could make Excel print those files from my

list,
already on-screen. Besides, doing what I've just described would not
necessarily mean the files would be printed in the order of the Excel

list.
Which means that having a perfectly sorted order of files to be printed
would nonetheless still include: me, sitting behind a desk, (litterally)
sorting things out. Not if I can help it. Or would that be ... Not if you
can help it.?





Example:



Folder on hard-drive (=destination): D:\Scans to be handled



Files within that folder:

823000.pdf

823001.pdf

823002.tif

823003.tif

823004.tif

823005.pdf

823006.pdf

823007.pdf

823008.tif

823009.tif

823010.tif





I'd like our printer to print these files in the order mentioned above. I
use Acrobat Reader for the pdf files and some kind of KODAK viewer for the
.tif files.



Thanks in advance for your kind help.



Peter







Ivan F Moala[_83_]

Printing non-excel files from excel
 

As NickHK has mentioned, look @ the API ShellExecuteA

see here

http://www.xcelfiles.com/ShellExecuteA.html


--
Ivan F Moala


------------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954
View this thread: http://www.excelforum.com/showthread...hreadid=541702



All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com