How to detect the print preview window of Excel 2003, with vb.net? -


I should be able to check that the preview of the current view is in Excel 2003.

Is there something in the Excel object model just to use this property? (Such as the application in word object model. Printfruv ...).

Any advice you are welcome,

thanks

Julian

PS: Long story short, I have keyboard shortcuts in my custom functions I am developing a vsto addin with the cache, and I have to disable this shortcut when the print preview is on.

You want to determine that it is in xlPageBreakPreview

Windows (1) .View = xlPageBreakPreview then finish the '#' if your

note that Windows (1) always means "active view".

Edit: Read the question again and you see the meaning of the actual print preview window. This is a dialog for the application. Dialog (xlDialogPrintPreview) . This is the only method . Show . But it does not really matter because the code does not run when this code is open, it will return only two values ​​- True and False . Therefore true means something was printed and incorrect instrument this printing was closed without printing . You can return the value by doing something like this:

  dlgPrinted = Application.Dialogs (xlDialogPrintPreview). Debug debug if DLL is done. Print "Worksheet was printed" Els Debug. Print "Print Preview Off the User Without Printing." End If  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -