ExcelBanter

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

Murray Williams

Printing .pdf files from directory from excel
 
I found out how to print from a directory -- I'm using the
following code:

ShellExecute GetForegroundWindow, "Print", _
"C:\My PDF Directory/File1.pdf", _
"", "", SW_SHOWMINNOACTIVE

Now my question, how would I do something similar for
printing a pdf file from a website? When I try to use
something similar to that above, I get nothing:

ShellExecute GetForegroundWindow, "Print", _
"http://www.centman.com/PDF/ValueInvAug2003.pdf", _
"", "", SW_SHOWMINNOACTIVE

If I substiture "Open" for "Print" the ShellExecute code
will open the document:

ShellExecute GetForegroundWindow, "Open", _
"http://www.centman.com/PDF/ValueInvAug2003.pdf", _
"", "", SW_SHOWMINNOACTIVE

I would be truly grateful for any help.

thanks, Murray Williams


-----Original Message-----
I have a spreadsheet that has links to cells that refer

to
specific .pdf report files. I'd like to be able to set

it
up so that a user could select several cells and then hit
a button that would print the .pdf files for those
selected cells by clicking on a "Print Selected PDF

Files"
button.

For example, let's say I had a directory called == C:\My
PDF Directory and it contains the following files:
File1.pdf
File2.pdf
File3.pdf
File4.pdf
File5.pdf

How would I issue a command from excel to print files 2,4
and 5 if those were the ones that were selected?

thanks,

Murray Williams
.



All times are GMT +1. The time now is 01:39 AM.

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