易丰科技

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3332|回复: 0
打印 上一主题 下一主题

取得档案详细的属性资料

[复制链接]

111

主题

117

帖子

3588

积分

论坛元老

Rank: 8Rank: 8

积分
3588
跳转到指定楼层
楼主
发表于 2011-10-1 09:34:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
使用 System.IO.FileInfo 只能取得档案部份的资料
比如像 word, excel 等,都还有其他的属性,要取得这些属性
可以参考使用
Microsoft Developer Support OLE File Property Reader 2.1 Sample (KB 224351)
下载位址:http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8422
原文介绍:
The Microsoft Developer Support OLE File Property Reader 2.1 Sample demonstrates how to use the IPropertyStrorage interface to read and write document properties of Microsoft Word, Microsoft Excel, Microsoft PowerPoint, and Microsoft Visio files, independent of the application that created the file. The sample includes a binary COM component and the component source code, which developers working in managed code (VB.NET or C#) or scripting languages (VBScript, JScript, ASP) can use to better enhance their ability to index, search, organize or edit the properties of Office files from custom projects.

The sample has been updated in version 2.1 to handle non-OLE files, such as the new Office 2007 file formats, if a custom property handler is available. This will allow users that have the Office 2007 Compatibility Pack to read/write document properties for Office 2007 files without actually having Office 2007 installed.


执行後的画面:


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|易丰科技

GMT+8, 2024-10-13 19:20 , Processed in 0.043974 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表