摘要:
public class WordAPI{ private object _template; private object _newWord; private Microsoft.Office.Interop.Word.Application wordApp; private Microsoft.Office.Interop.Word.Document _wordDocument; private object defaultV = System.Reflection.Missing.Value; private object documentType; /// <summary> 阅读全文
摘要:
1、 Microsoft.Office.Interop.Word.Application wordApp = new ApplicationClass()word对象2、 Microsoft.Office.Interop.Word.Document wordDoc = wordApp.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing) 文档对象3、 Object Nothing = System.Reflection.Missing.Value 常用的一个参数4、wordApp.ActiveWindow.Activ 阅读全文
摘要:
我们在调用word打印的时候有时候出现过这种情况。即,我们调用wordDoc.PrintOut把数据发送给打印机后,调用关闭程序的方法,有时候会出现数据未完全发送给打印机造成数据丢失页面打印不全的问题。解决办法:强制让程序把数据全部发给打印机后在关掉结束掉打印进程。object wdpa = WdPrintOutRange.wdPrintAllDocument; object wdItem = WdPrintOutItem.wdPrintDocumentContent; object wdPageType = WdPrintOutPages.wdPrintAllPages; object ba 阅读全文