資源簡介
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個文件信息
- 上一篇:linq操作數據以及集合
- 下一篇:C#獲取本地磁盤目錄源代碼
評論
共有 條評論