mdamazon has asked for the wisdom of the Perl Monks concerning the following question:

I have a project where I am re-purposing some older Word docs. I copy the old documents to a new folder, open them, execute a search and replace using Win32::OLE, then save them. That works fine, except those documents that have been "Marked as Final", which I am unable to make changes to. Is there a way in Win32::OLE to 1.) check if the document is marked as final, and if so, 2.) unmark the document. Thanks!
  • Comment on Win32::OLE and Word docs "Marked as Final"

Replies are listed 'Best First'.
Re: Win32::OLE and Word docs "Marked as Final"
by hdb (Monsignor) on Mar 15, 2019 at 14:08 UTC

    The document object has a "Final" property which you can check or set like

    $doc->{Final} = 1;

    to mark the document as final.