Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

Unlocking and Locking a Document Clears the Undo Stack

$
0
0

Hi all,

We have a VSTO AddIn for Word 2010 that manages some special documents that we have for our company. The documents are locked down except for some content controls we have inserted in the document body.

Track changes seems to be prohibited when the document is locked - to get around this we build our own track changes button that programmatically unlocks the document (i.e. like "Stop Protection"), starts tracking, and locks the document again (i.e. like "Restrict Editing"). We have to do this as well whenever we accept or reject a change (unlock, reject, lock, etc). Works fine - the problem is whenever we unlock and lock a document, the undo stack is cleared. Anyone have ideas on how to preserve the undo stack when unlocking and locking a document? 

Thanks in advance



Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>