如何以编程方式访问“打印预览和打印" Word 2010中的页面 [英] how to access programmatically to "print preview and print" page in Office Word 2010
本文介绍了如何以编程方式访问“打印预览和打印" Word 2010中的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写与Microsoft Office Word 2010相关的医疗程序(使用C#语言).在Word 2010中,有一个页面打印预览和打印",您可以通过按 Ctrl + P .启动Office Word之后,我想看到打印预览和打印",但是我看到的是Office 2007/2003中的旧打印预览,这意味着我不知道如何从Office com对象访问此页面.
I am writing a medical program (with C# Language) which has a relation with Microsoft Office Word 2010. In Word 2010 there is a page "Print Preview and Print" which you can access by pressing Ctrl+P. After I launch Office Word, I want to see "Print Preview and Print" but instead I see the old print preview from Office 2007/2003, which means I don't know how to access this page from office com objects.
我尝试过的代码:
oWordDoc.PrintPreview();
_oWord.Visible = true;
推荐答案
You can always try SendKeys to do the same as the hotkey CTRL+P
SendKeys.Send("^P");
这篇关于如何以编程方式访问“打印预览和打印" Word 2010中的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文