小编and*_*rew的帖子

如何使用Microsoft.Office.Interop.Word.Document.PrintOut()将docx打印到特定的打印机

这似乎是一个简单的需求,但由于某种原因,我无法找到如何实现这一目标.我有这样的代码:

Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
MemoryStream documentStream = getDocStream();
FileInfo wordFile = new FileInfo("c:\\test.docx");
object fileObject = wordFile.FullName;
object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Document doc = wordInstance.Documents.Open(ref fileObject, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
doc.Activate();
doc.PrintOut(oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
Run Code Online (Sandbox Code Playgroud)

我需要一个配置设置驱动器,使用哪个打印机和托盘.在搜索之后我发现了Microsoft.Office.Interop.Word.Application.ActivePrinter这是一个可设置的字符串属性,文档中说的是"活动打印机的名称",但我不知道这对打印机来说意味着什么"活动打印机",特别是当我有两个时.如何实现这一目标?

c# ms-word office-interop

9
推荐指数
1
解决办法
2万
查看次数

用于创建ASP.Net成员资格数据库的代码

在我自己编写之前,是否有ac#方法在那里浮动,将创建由aspnetregsql安装的表,sprocs和视图?

c# sql-server asp.net asp.net-membership

1
推荐指数
1
解决办法
871
查看次数

在Visual Studio 2010中查看框架类型的MSDN文档

在Visual Studio 2010中是否可以在我的代码中右键单击框架类(如System.Web.UI.Page)并能够单击以查看该类的文档?

visual-studio-2010

1
推荐指数
1
解决办法
33
查看次数