Handling Print Preview Closing Event in Word
I want to use Word's 开发者_C百科print preview window for previewing and printing Word documents. I am using code like this (that works well):
wordApplication.Visible = true;
document = wordApplication.Documents.Open(documentPath);
document.PrintPreview();
But when user closes print preview window he see the Word's main window. How I can to handle print preview closing even to hide Word's application?
you can use this code to close any window in word
Windows("Your document name").close
精彩评论