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

Send filename to "Print to file" dialog box

Status
Not open for further replies.

SBang

Programmer
Jan 23, 2003
1
DK
Hi
I'm trying to create a postscript file using VB6, NT4
I' have installed a postscript driver, and are using the printout method of Excel object (8).

During this process a Print to file dialog box appears.
I would like to create the ps-file without any userinteraction.

Can I intercept the Print to file dialoge box
and send the filename to it, and afterwards close it through API ?

Any suggestions ?

Soren Bang

 

Yes, Check out EnumWindows, EnumChildWindows, and SendMessage API. The advice here is to enum through the open windows looking for your print dialog. Once found then loop through the child windows and using sendmessage to click on or type into the objects of the print dialog box as necessary.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top