C#或CMD:删除Word文件元数据 [英] C# or CMD: Remove Word file metadata

查看:346
本文介绍了C#或CMD:删除Word文件元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用C#或Windows批处理命令以编程方式删除MS Word文件或图像文件的元数据信息?

Is there a way to remove the metadata information of MS Word files or Image files programmatically using C# or a Windows batch command?

删除这些信息的手动方法是右键单击Windows资源管理器中的文件,然后选择属性>详细信息>删除属性和个人信息。

The manual way to remove those information is to right click a file in the windows explorer and selecting 'Properties'>'Details'>'Remove Properties and Personal Information'.

推荐答案

谢谢!
我想我找到了将办公文档中的元信息删除(或添加)的方法。这里有一篇Microsoft文章: Dsofile.dll文件允许您编辑Office文档属性没有安装Office(KB 224351)


Dsofile.dll示例文件是$ b的进程内ActiveX组件$ b程序员使用Microsoft Visual Basic .NET或Microsoft .NET
Framework。您可以在自定义应用程序中使用它来读取和
编辑与Microsoft
Office文件关联的OLE文档属性,例如:

The Dsofile.dll sample file is an in-process ActiveX component for programmers that use Microsoft Visual Basic .NET or the Microsoft .NET Framework. You can use this in your custom applications to read and to edit the OLE document properties that are associated with Microsoft Office files, such as the following:


  • Microsoft Excel工作簿

  • Microsoft PowerPoint演示文稿

  • Microsoft Word文档Microsoft

  • 项目项目Microsoft Visio绘图

  • 以OLE结构化存储格式保存的其他文件

  • Microsoft Excel workbooks
  • Microsoft PowerPoint presentations
  • Microsoft Word documents Microsoft
  • Project projects Microsoft Visio drawings
  • Other files that are saved in the OLE Structured Storage format

Dsofile.dll示例文件是用Microsoft Visual C ++编写的
。 Dsofile.dll示例文件
演示了如何使用OLE32 IPropertyStorage接口访问OLE结构化存储文件的扩展属性
。组件
将数据转换为自动友好数据类型,以便更方便地使用
高级编程语言,如Visual Basic 6.0,Visual
Basic .NET和C#。 Dsofile.dll示例文件以完整的
源代码提供,包括用Visual Basic 6.0
和Visual Basic .NET 2003(7.1)编写的示例客户端。

The Dsofile.dll sample file is written in Microsoft Visual C++. The Dsofile.dll sample file demonstrates how to use the OLE32 IPropertyStorage interface to access the extended properties of OLE structured storage files. The component converts the data to Automation friendly data types for easier use by high level programming languages such as Visual Basic 6.0, Visual Basic .NET, and C#. The Dsofile.dll sample file is given with full source code and includes sample clients written in Visual Basic 6.0 and Visual Basic .NET 2003 (7.1).

这篇关于C#或CMD:删除Word文件元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆