开发者

Handling Print Preview Closing Event in Word

开发者 https://www.devze.com 2023-04-11 06:45 出处:网络
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):

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
0

精彩评论

暂无评论...
验证码 换一张
取 消