View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default ThisWorkbook BeforePrint

AFAIK, there's no way to detect the difference between Print and Print
Preview.

However, you can trap the Print Preview command with something like:

CommandBars(1).Controls("File").Controls("Print Preview").OnAction:= _
"MyMacro"

and

Commandbars("Standard").FindControl(id:=109).OnAct ion = "MyMacro"

In article ,
"Simon Shaw" <simonATsimonstoolsDOTcom wrote:

what if the user was performing a print preview... how do I tell the
difference?