首页 新闻 会员 周边 捐助

c#怎样打开受限制WORD文档

0
悬赏园豆:10 [已关闭问题]

下面是我用代码提取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);

行風的主页 行風 | 初学一级 | 园豆:190
提问于:2010-05-25 14:33
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册