这似乎是一个简单的需求,但由于某种原因,我无法找到如何实现这一目标.我有这样的代码:
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这是一个可设置的字符串属性,文档中说的是"活动打印机的名称",但我不知道这对打印机来说意味着什么"活动打印机",特别是当我有两个时.如何实现这一目标?
在我自己编写之前,是否有ac#方法在那里浮动,将创建由aspnetregsql安装的表,sprocs和视图?
在Visual Studio 2010中是否可以在我的代码中右键单击框架类(如System.Web.UI.Page)并能够单击以查看该类的文档?