By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Shelling out to Adobe

P: n/a
I have been using the ShellExecute command for about a year to print
out a list of PDF files. It's a great capability. Of course, the
documents are actually printed by the Adobe application. We have
recently added a new, high speed, black and white, printer which would
be perfect for the engineering documents I want to print.
Does anyone know if the destination printer can be selected when
using ShellExecute? There is a string field called parameters which
might be usable for that purpose but I have no protocol information
for it. I have looked through Adobe help and could find nothing under
the headings of "Printers", "Selecting", "Command Lines" or "DOS"
I don't want to change the windows default printer even briefly.
As a work around I can make it work by opening Adobe manually and
selecting the desired printer. All subsequent documents then go to
that printer. I would rather set it programatically.
Thanks,
Hank Reed
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hank Reed wrote:
I have been using the ShellExecute command for about a year to print
out a list of PDF files. It's a great capability. Of course, the
documents are actually printed by the Adobe application. We have
recently added a new, high speed, black and white, printer which would
be perfect for the engineering documents I want to print.
Does anyone know if the destination printer can be selected when
using ShellExecute?
How would that help?
There is a string field called parameters which
might be usable for that purpose but I have no protocol information
for it.
How would that help.
I have looked through Adobe help and could find nothing under
the headings of "Printers", "Selecting", "Command Lines" or "DOS"
That would help.
I don't want to change the windows default printer even briefly.
As a work around I can make it work by opening Adobe manually and
selecting the desired printer.
That would work.
All subsequent documents then go to
that printer. I would rather set it programatically.
How would setting a printer destination in Access help in setting a
printer in Adobe? If you can''t set (don't know) the command line
parameters when opening Adobe I'd be at a loss how Access can do it any
better.

Thanks,
Hank Reed


Subscribe to a newsgroup for Adobe and find out what the parameters are.
If there are some parameters, try them out...make sure you change
shellexecute to pass the string instead of null.

Nov 12 '05 #2

P: n/a
I may not have explained my question so you could understand it. I want
to know if there is a way to embed printer information into the
parameters field that is part of the ShellExecute command I use to open
Adobe and print documents remotely form Access.
As I understand the fields of the call, there is:
An Operation field
A file name field
A Parameters field
A Directory field
A Show Command field
I know nothing of the usage of the Parameters field and was
wondering if it could be used to specify the printer that Adobe would
use.
My command string is typically:
shellexecute Me.hwnd, "print", FileName, "", 0, SW_SHOWNORMAL

Thanks,
Hank Reed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

P: n/a
I don't know about shell - but you could add a reference to Acrobat, then do
something like this...

air code here but I would think it goes something like this...

dim ar as acrobat.application
set ar = new acrobat.application
ar.show = false 'or true
ar.open "x:\somefile.pdf"
ar.print
set ar = nothing

You might also check for errors when creating the ar variable to see if
Acrobat is not installed.

Here is a link to a pdf that contains some of the props and methods - might
have to translate some of the cpp to vb though...

http://partners.adobe.com/asn/acrobat/docs/iacovr.pdf

Good luck!

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access

"Hank Reed" <ha********@aol.com> wrote in message
news:3f*********************@news.frii.net...
I may not have explained my question so you could understand it. I want
to know if there is a way to embed printer information into the
parameters field that is part of the ShellExecute command I use to open
Adobe and print documents remotely form Access.
As I understand the fields of the call, there is:
An Operation field
A file name field
A Parameters field
A Directory field
A Show Command field
I know nothing of the usage of the Parameters field and was
wondering if it could be used to specify the printer that Adobe would
use.
My command string is typically:
shellexecute Me.hwnd, "print", FileName, "", 0, SW_SHOWNORMAL

Thanks,
Hank Reed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.