• 大小: 0.49M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: Word  

资源简介

C#提取目录中的Word文档,有提取、统计页数功能

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.IO;
using System.Threading;
namespace DistillWordList
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Thread td;

        private void GetWordList(string WordPath)
        {
            try
            {
                Word.Document doc = null;
                Word.Application app = new Word.Application();
                object none = System.Reflection.Missing.Value;
                Word.Document doc2 = app.Documents.Add(ref none ref none ref none ref none)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-01-21 13:55  获取目录中word问文件列表\
     目录           0  2013-01-21 13:55  获取目录中word问文件列表\DistillWordList\
     文件         935  2008-12-17 15:31  获取目录中word问文件列表\DistillWordList.sln
     目录           0  2013-01-21 13:55  获取目录中word问文件列表\DistillWordList\bin\
     目录           0  2013-01-21 13:55  获取目录中word问文件列表\DistillWordList\bin\Debug\
     文件       14336  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\bin\Debug\DistillWordList.exe
     文件       36352  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\bin\Debug\DistillWordList.pdb
     文件       14328  2009-01-12 15:29  获取目录中word问文件列表\DistillWordList\bin\Debug\DistillWordList.vshost.exe
     文件         490  2007-07-21 01:33  获取目录中word问文件列表\DistillWordList\bin\Debug\DistillWordList.vshost.exe.manifest
     文件      155648  2010-08-18 17:51  获取目录中word问文件列表\DistillWordList\bin\Debug\Interop.Office.dll
     文件       57344  2008-12-17 16:17  获取目录中word问文件列表\DistillWordList\bin\Debug\Interop.VBIDE.dll
     文件      495616  2008-12-17 16:17  获取目录中word问文件列表\DistillWordList\bin\Debug\Interop.Word.dll
     文件        4674  2008-12-23 09:01  获取目录中word问文件列表\DistillWordList\DistillWordList.csproj
     文件        8858  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\Form1.cs
     文件        8462  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\Form1.Designer.cs
     文件        6022  2010-08-18 17:51  获取目录中word问文件列表\DistillWordList\Form1.resx
     目录           0  2013-01-21 13:55  获取目录中word问文件列表\DistillWordList\obj\
     目录           0  2013-01-21 13:55  获取目录中word问文件列表\DistillWordList\obj\Debug\
     文件        3621  2009-01-12 15:29  获取目录中word问文件列表\DistillWordList\obj\Debug\DistillWordList.csproj.FileListAbsolute.txt
     文件         847  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\obj\Debug\DistillWordList.csproj.GenerateResource.Cache
     文件         717  2008-12-17 16:17  获取目录中word问文件列表\DistillWordList\obj\Debug\DistillWordList.csproj.ResolveComReference.cache
     文件       14336  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\obj\Debug\DistillWordList.exe
     文件         180  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\obj\Debug\DistillWordList.Form1.resources
     文件       36352  2009-01-06 09:05  获取目录中word问文件列表\DistillWordList\obj\Debug\DistillWordList.pdb
     文件         180  2008-12-23 09:15  获取目录中word问文件列表\DistillWordList\obj\Debug\DistillWordList.Properties.Resources.resources
     文件      155648  2010-08-18 17:51  获取目录中word问文件列表\DistillWordList\obj\Debug\Interop.Office.dll
     文件       57344  2008-12-17 16:17  获取目录中word问文件列表\DistillWordList\obj\Debug\Interop.VBIDE.dll
     文件      495616  2008-12-17 16:17  获取目录中word问文件列表\DistillWordList\obj\Debug\Interop.Word.dll
     目录           0  2012-05-02 09:55  获取目录中word问文件列表\DistillWordList\obj\Debug\Refactor\
     目录           0  2012-05-02 09:55  获取目录中word问文件列表\DistillWordList\obj\Debug\TempPE\
     文件         496  2008-12-17 15:30  获取目录中word问文件列表\DistillWordList\Program.cs
............此处省略6个文件信息

评论

共有 条评论