I've run into the same bug described by shan_chennai in an earlier post
(look here
http://groups-beta.google.com/group/...844d0064afb245)
This occurs when the default printer is the "Microsoft Office Image Writer".
When the user does a print preview and selects the "Print" toolbar item, a
"save as" dialog appears. If (as is likely the case) the user cancels the
"save as". Under these circumstances, an exception
(System.Compone ntModel.Win32Ex c*eption: "The operation was canceled by the
user") is raised. Even with a try/catch block around all the code that pops
up the print preview dialog, this exception cannot be caught at runtime.
Actually, in Visual Studio .NET it *is* caught at runtime, but in the
compiled executable (with or without debug flags), the exception occurs in
some internal event handling of the toolbar button.
If anyone has any idea how this can be worked around, it would be greatly
appreciated. Thanks for your help.
Tom Clement
www.serena.com