none
How to remove Mark as Final property in Word Document using Microsoft.Office.Interop.Word.dll(version 10.0.4504.0) RRS feed

  • Question

  • Hi,

    I have one word document that contains Macro, password protected and it is marked as Final. When i tried to import that document to my .Net application, it is asking for password. Later when i tried to open that document internally in temporary path, it is asking for password again and again even though when i have set the password to null internally. The issue because the document is marked as 'Final'

    How can i remove 'Mark as Final' property(set to false) using Microsoft.Office.Interop.Word.dll(version 10.0.4504.0). I could find the property 'Final' in Microsoft.Office.Interop.Word.dll(version 14.0.0) and it can be set to true or false.But it is not there version 10.0.4504.0.

    So how can i remove 'Mark as Final' property(set to false) using Microsoft.Office.Interop.Word.dll(version 10.0.4504.0)?

    Can anyone please help me on this?

    Thanks,

    Shanavas

    Tuesday, August 27, 2013 10:22 AM

Answers

  • Hi Shanavas

    As this feature is new in Word 2013 there's no way to access it through the Word 2010 object model; the feature is simply not supported there. The only thing I can imagine is to remove it from the file via Word's Open XML file format. I have no idea in what part of the zip package this is stored and a quick search of the Open XML SDK reference didn't turn it up. You might need to compare two documents - one with, one without the setting, but otherwise identical - then use the Productivity Tool to ask how to create the one from the other. That should bring the required class to light...


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, August 27, 2013 11:19 AM
    Moderator