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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ShellExecute to print but without print dialogue?

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
0
0
GB
Hi,

Is it possible to use ShellExecute to print a document (say a saved webpage) without the Print Dialogue box appearing?

I want to send a bunch of small webpages to the printer but a print dialogue box appears for each one. I'd like it to appear the first time and then just assume the same settings thereafter.


- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Andy,

I tried this some time back. the only way i found would be useful only if you / your users have admin rights on the workstation, as it involves stoping the messanger service via DOS i.e.

Code:
   Shell "net stop messenger"
'      your printing code
   Shell "net start messenger"	
[\code]

I'd be interested should you find a better method.

Everybody body is somebodys Nutter.
 
Thanks Chris.

I was hoping that maybe one of the 2 parameters that can be sent with ShellExecute (usually both null) might suppress the dialogue but I can't find anything along these lines in MSDN.


- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
AndyGroom I am having just the opposite problem. I want the Print Dialogue box to come up when I request to print an RTF document with ShellExecute(0, "Print", fileName,"","",showType), however I can not seem to get it. My files just go directly to the printer nomatter what option I use for showType (values go from 0 to 10). What are you doing that's different ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top