Are you looking to automate the process for the group of spreadsheets you need to print or would each spreadsheet be printed on an ad hoc basis?
Let me give you some information about what we are doing so you can understand what we are trying to do. We have a dozen or more sheets that are filled in with various information. Some of these spreadsheets have hundreds of input locations, we could possibly use some of them, perhaps all of them, but mostly we only use half a dozen or so at any given time.
The spreadsheet, if printed as it is, takes 3 pages, but much of that information is unused for any given printout. We already have options the user can select to hide/show the portions of the spreadsheet not used, when we do this, the printout fits nicely on a single page, exactly what we want. However, now we wish to make it a little less painful by automating the hiding and showing of the portions of the sheet not used.
Process:
User fills in the required fields and prints the spreadsheet.
Print events should hide the unused components, print the single page, show the hidden components for the next use.
You could maybe figure out if Excel posts something to its message queue at the end of printing by watching the messages that are posted during a typical print cycle using something like the Spy++ tool that comes with older versions of MSVC++. Then you could subclass the window and process that message yourself. Trying to figure out what all those messages mean can be a witch with a capital B though.
Agreed .. and I could sublcass Excel, but I don't have the time to devote to sorting the messages right now