Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing in adobe acrobat

Status
Not open for further replies.

borsker

Programmer
Jul 24, 2002
147
US
I am looking to print a pdf in acrobat but when I do using these commands


DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, STRING cAction, STRING cFileName, ;
STRING cParams, STRING cDir, INTEGER nShowWin
myPDFFile2 = "M:\watchedpdf\out\megavippprintsheet.pdf"
=ShellExecute(0,"PRINT",myPDFFile2,"","",2)

Declare Long FindWindow in User32 ;
String cClassname, String cTitle
Declare Long SendMessage in User32 ;
Long nhWnd, Long Msg, Long wParam, Long lParam
hWnd = FindWindow(Null, 'Adobe Acrobat')
SendMessage(hWnd, 0x10, 0, 0)


Acrobat comes up and and becomes the active window. I want it to become the inactive window. I am also having trouble with it closing before the page prints. Is there some kind of way I can change theese commands in a way that will enable me to print the pdf and close it without even noticeing what was going on. BUT when I have some other pdf open, lets say Apdf and the program prints Bpdf it will not close on Apdf?
 
borsker,

I am having the same problem. Please let me know if you find out how to solve this problem. Thanks.
 
Reader or Full Acrobat? Reader means you have to try to work with shellexecute, the full version mean you could automate it.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top