Sign In  Sign Up Live-Chat

Deleting document properties

Last post 07-03-2009, 1:55 PM by alexey.noskov. 5 replies.
Sort Posts: Previous Next
  •  07-03-2009, 5:23 AM 186747

    Deleting document properties .NET

    Attachment: Present (inaccessible)

    How I can deleting all document properties with Aspose.Words like Microsoft Office 2007 "Document Inspector" command? I tried to use

    document.BuiltInDocumentProperties.Clear();
    document.CustomDocumentProperties.Clear();

    but after saving it (in DOCX as sample) after checking document properties in Microsoft Word 2007 (SP2) Document Inspector find some properties:


    Alexander Kozlenko
    SDE, Lime Systems
    Filed under: Document Properties
     
  •  07-03-2009, 6:58 AM 186767 in reply to 186747

    Re: Deleting document properties

    Hi Alexander,

     

    Thanks for your request. It is impossible to remove all built-in document properties, MS Word does not do so as well. It seems Document Inspector tells that there are properties or personal information, if built-in document properties are not updated. For example here what Aspose.Words writes into the document (I used WML document for testing):

     

    <o:DocumentProperties>

        <o:Revision>0</o:Revision>

        <o:TotalTime>0</o:TotalTime>

        <o:Pages>0</o:Pages>

        <o:Words>0</o:Words>

        <o:Characters>0</o:Characters>

        <o:Lines>0</o:Lines>

        <o:Paragraphs>0</o:Paragraphs>

        <o:CharactersWithSpaces>0</o:CharactersWithSpaces>

        <o:Version>0.0000</o:Version>

    </o:DocumentProperties>

     

    And here is what MS Word writes, when I click “Remove All” in Document Inspector:

     

    <o:DocumentProperties>

        <o:Revision>1</o:Revision>

        <o:TotalTime>0</o:TotalTime>

        <o:Created>2009-07-03T11:49:00Z</o:Created>

        <o:LastSaved>2009-07-03T11:49:00Z</o:LastSaved>

        <o:Pages>1</o:Pages>

        <o:Words>0</o:Words>

        <o:Characters>0</o:Characters>

        <o:Lines>1</o:Lines>

        <o:Paragraphs>1</o:Paragraphs>

        <o:CharactersWithSpaces>0</o:CharactersWithSpaces>

        <o:Version>12</o:Version>

    </o:DocumentProperties>

     

    As you can see, MS Word just updates values of built-in document properties.

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  07-03-2009, 7:12 AM 186772 in reply to 186767

    Re: Deleting document properties

    Thanks a lot for example. And have last question: if I "Remove all properties" from Microsoft Word Document Inspector and save document, after reopening Document Inspector doesn't find them again. May be some flag in document?
    Alexander Kozlenko
    SDE, Lime Systems
     
  •  07-03-2009, 7:41 AM 186779 in reply to 186772

    Re: Deleting document properties

    Yes, it seems Ms Word also writes flag in docPr:

     

    <w:docPr>

        <w:view w:val="print" />

        <w:zoom w:percent="100" />

        <w:removePersonalInformation />

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  07-03-2009, 8:49 AM 186800 in reply to 186779

    Re: Deleting document properties

    Can you add this flag when clearing document properties?
    Alexander Kozlenko
    SDE, Lime Systems
     
  •  07-03-2009, 1:55 PM 186835 in reply to 186800

    Re: Deleting document properties

    Thanks for your inquiry, Alexander. We will consider adding such feature in Aspose.Words.

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
View as RSS news feed in XML