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

  • 相关阅读:
    form 元素横向排列
    mysql5.6 主从同步
    centos iptables
    angular 数据绑定
    angular路由 模块 依赖注入
    angular $scope对象
    angular前端开发环境
    使用STM32CubeMX生成RTC工程[闹钟中断2]
    利用STM32CubeMX生成HID双向通讯工程
    使用STM32CubeMX生成RTC工程[秒中断]
  • 原文地址:https://www.cnblogs.com/greencolor/p/1650048.html
Copyright © 2011-2022 走看看