You can close the window using Windows API calls FindWindow and DestroyWindow. These are in MSDN.
If you need help using these calls, let me know.
>Thanks Gregory!
>
>I found a little post here about it - and they mention the same problem I am experiencing - that adobe stays up after the print.
http://www.peg.com/lists/peg/web/msg13558.html>
>Anyone out there know how to get adobe to close?
>
>>>>>How can I send a pdf to a particular windows printer?
>>
>>
>>Wayne,
>>
>>ShellExecute does it. The only problem I see is that an acrobat window is left behind
>>
>>
>>FileName = '\tmp\test.pdf'
>>PrinterName = getprinter()
>>
>>?ShellExecute(0, 'printto', FileName, '"'+PrinterName+'"', 0, 0)
>>________________________________________________________________
>>The Printto command looks something like
>>
>>"C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" /t "%1" "%2" "%3" "%4"
>>
>>
>>
>>
>>
>>
>>We're using the first two params
>>
>>ps : enclose all parameters in double quotes
>>
>>
>>You can find the printto command with regedit
>>HKEY_CLASSES_ROOT\AcroExch.Document\shell\printto\command
>>
>>and AcroExch.Document can be found in
>>HKEY_CLASSES_ROOT\
.pdf in Default
>>
>>
>>And, of course, you can also change the windows printer, print, and reset the windows printer to its old value