.net 怎么在调用word文件时不打开word进行读取word的内容?
object oFileName = @"E:\专家库2\中规范化法\大幅度法.doc";object oReadOnly = true;
object oMissing = System.Reflection.Missing.Value;
Word._Application oWord;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
//下面这段代码打开word
oDoc = oWord.Documents.Open(ref oFileName, ref oMissing, ref oReadOnly, 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);
for (int tablePos = 1; tablePos <= oDoc.Tables.Count; tablePos++)
{
//Word.Table nowTable = oDoc.Tables.Item(tablePos);
Word.Table nowTable = oDoc.Tables[tablePos];
怎么使它不打开word读 E:\专家库2\中规范化法\大幅度法.doc 文件 --------------------编程问答-------------------- 帮顶 ! --------------------编程问答-------------------- 提示什么? --------------------编程问答-------------------- ding
--------------------编程问答-------------------- oWord.Visible = false; 看看。 --------------------编程问答-------------------- 可以用Ado.net连接word:
http://www.alixixi.com/weBuild/subject4/200512131410653.html --------------------编程问答-------------------- Word.ApplicationClass wa = new Word.ApplicationClass();
object filename = @"d:\1.doc";
object missing = System.Reflection.Missing.Value;
wa.Documents.Open(ref filename, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
wa.ShowMe(); --------------------编程问答-------------------- up --------------------编程问答-------------------- 用word2007吧
文档是xml格式 --------------------编程问答-------------------- up --------------------编程问答-------------------- 如何打开有工具栏的word文件 --------------------编程问答-------------------- http://www.cnblogs.com/duguguiyu/archive/2006/08/11/474400.html
补充:.NET技术 , C#