zoukankan      html  css  js  c++  java
  • extract word into string

                string textreadinall;
                object nullobj = System.Reflection.Missing.Value;
                object docFalse = false;
                object docTure = true;
                object fofile = textBox1.Text;
                Word.Application wordApp = new Word.Application();
                Word.Document doc = new Word.Document();
                wordApp.Visible = true;
                doc = wordApp.Documents.Open(ref fofile, ref nullobj, ref nullobj,
                    ref nullobj, ref nullobj, ref nullobj,
                    ref nullobj, ref nullobj, ref nullobj,
                    ref nullobj, ref nullobj, ref nullobj,
                    ref nullobj, ref nullobj, ref nullobj,
                    ref nullobj);
                 doc.ActiveWindow.Selection.WholeStory();
                 doc.ActiveWindow.Selection.Copy();
                 IDataObject data = Clipboard.GetDataObject();
                 textreadinall = data.GetData(DataFormats.Text).ToString();
                 doc.Close(ref docFalse, ref nullobj, ref nullobj);
                 wordApp.Quit(ref nullobj, ref nullobj, ref nullobj);

  • 相关阅读:
    django 参考
    数据库答案
    django -- form表单
    django ajax
    Django----中间件详解
    ORM中自定义一个char类型字段
    北理工《网站设计与开发实践》在线作业 附答案
    正则表达式 ?P<name>
    Django模板语言相关内容
    【CSS】 布局之多列等高
  • 原文地址:https://www.cnblogs.com/greencolor/p/1650048.html
Copyright © 2011-2022 走看看