下面是我用代码提取WORD文档中的文字的代码,可打不开受权限限制的WORD。要怎么才可以打开呢?
Word.Application app = new Word.Application();
app.Visible = false;
object obj = System.Reflection.Missing.Value;
object infile = (object)filename;
Word.Document doc = app.Documents.Open(ref infile, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj);
context = doc.Content.Text;
doc.Close(ref obj, ref obj, ref obj);
app.Quit(ref obj, ref obj, ref obj);