Already asked this question in http://www.experts-exchange.com/Applicatio…Q_20390478.html%5B/url%5D, but no solution up to now.
Situation: I want to intercept the Print Command (Menu/Icon), reason see in code header:
Sub SafePrint() 'Xerox Document Center 332ST chokes and crashs if paper not according its setup 'Happens too often, Xerox and/or our Hotline unable/unwilling to find a solution 'Idea: Re-route print command and check/correct paper setting first 'Drawback: Requires assigning macro to _Standard_ Toolbar 'which will cause trouble if sub not loaded '=> Abandoned until failsafe solution is found With ActiveSheet.PageSetup If .PaperSize xlPaperA4 And .PaperSize xlPaperA3 Then MsgBox "Paper neither A4 nor A3 ! Change first !", vbCritical, "Safe Print" Exit Sub 'To do: Add code to change paper selection Else 'To do: allow printing of range selections / whole workbooks too ActiveWindow.SelectedSheets.PrintOut End If End With End Sub
Question: I do not want to exchange the problem, therefore I need a failsafe solution, i.e. if add-in not present, Excel has its standard behaviour.
Or do you see a totally different approach ?