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

How can I intercept the Print Dialog

Status
Not open for further replies.

dba2

Programmer
May 23, 2002
16
GB
I want to write some code that 'forces' a user, when selecting Print in any MS Office App., to enter a reference number. Subsequently when they click the 'OK' button in the PrinterDialog I need to append the reference number to the filename before forwarding the job to the printer.
I believe there could be one of two options, either I need to add an extra edit box to the PrinterDialog and then check that it has an entry in it or 'intercept' the pressing of the 'OK' button to pop up another form subsequently.
Unfortunately I can't see a way of doing either!

Can anyone help please?
 
Not sure if it is what you are looking for but what about the Workbook_BeforePrint(Cancel As Boolean) event? Use this event to "intercept" the printing.

********************
What's the best way to get the answers you need?? See FAQ222-2244 for details!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top