We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Clean word document properties

Hi there,
Our goal is to clean following details from the word document:

  • Document properties, including information from the Summary, Statistics, and Custom tabs of the Document Properties dialog box
  • E-mail headers
  • Routing slips – seems not to be in 2007
  • Send-for-review information
  • Document server properties
  • Document Management Policy information
  • Content type information
  • Databinding link information for databound fields (last value is converted to text)
  • User name
  • Template name

Right now we are seeing two Aspose APIs for cleaning the doc properties -

doc.getBuiltInDocumentProperties().clear();
doc.getCustomDocumentProperties().clear();

We have not yet checked yet whether these two clearing mechanisms are taking care of clearing all as we mentioned above.
We also see some of them are not valid for 2007 onwards (ie; for docx files).
We are dealing with only docx files. Could you please tell us using two Aspose APIs what could be deleted and what not in above mentioned list?
Is there any other cleaning APIs required separately for some of the above in the list?

Hi Praneeth,

Thanks for your inquiry. The BuiltInDocumentProperties.clear and CustomDocumentProperties.clear method remove all properties from the collection.

Unfortunately, Aspose.Words does not support the requested feature at the moment. However, I have logged this feature request as WORDSNET-9906 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

Hi Tahir,
Sorry but we could not understand your point. Do you mean

doc.getBuiltInDocumentProperties().clear();
doc.getCustomDocumentProperties().clear();

would not clear all/some(?) of the following (List of what word’s document inspector could detect and clear)-

  • Document properties, including information from the Summary, Statistics, and Custom tabs of the Document Properties dialog box
  • E-mail headers
  • Routing slips – seems not to be in 2007
  • Send-for-review information
  • Document server properties
  • Document Management Policy information
  • Content type information
  • Databinding link information for databound fields (last value is converted to text)
  • User name
  • Template name

Could you please provide the detailed description of - WORDSNET-9906? What exactly is currently not supported?

Hi Praneeth,

Thanks for your inquiry. The BuiltInDocumentProperties.clear remove all properties from the collection e.g Subject, Comment, Title etc and CustomDocumentProperties.clear method remove custom properties of document. Please check the attached image for these properties.

However, BuiltInDocumentProperties.clear and CustomDocumentProperties.clear method do not clear the following detail from the document.

  • E-mail headers
  • Routing slips – seems not to be in 2007
  • Send-for-review information
  • Document server properties
  • Document Management Policy information
  • Databinding link information for databound fields (last value is converted to text)

It would be great if you please share some detail about your query what exact you want to achieve using Aspose.Words. Please also share your document which contains the above information here for our reference.

Tahir: It would be great if you please share some detail about your query what exact you want to achieve using Aspose.Words.

Hi Tahir,
We just want to simulate what MS word do when we remove all for ‘Document properties and personal information’ using document inspector.

http://office.microsoft.com/en-us/help/remove-hidden-data-and-personal-information-from-office-documents-HA010037593.aspx#BM1

Hi Praneeth,

Thanks for sharing the detail. I have logged this detail in WORDSNET-9906. For the time being, please use BuiltInDocumentProperties.clear and CustomDocumentProperties.clear methods. We will update you via this forum thread once this feature is available.