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);

  • 相关阅读:
    jdb应用 远程调试
    maven POM总结
    jvm
    jdbc取出表名 名称
    nginx配置openssl证书
    DNS A记录 CNAME NS记录等的区别
    linux文件目录类命令|--cd指令
    linux文件目录类命令--ls命令
    linux文件目录类命令--pwd命令
    linux 帮助指令
  • 原文地址:https://www.cnblogs.com/greencolor/p/1650048.html
Copyright © 2011-2022 走看看