Hi,
I am using c# and word interop. How can I, programmatically, undo all actions in word undo stack?
Regards.
Hi,
I am using c# and word interop. How can I, programmatically, undo all actions in word undo stack?
Regards.
Here is the solution :
object times = 1;
while (worDocument.Undo(ref times))
{}
But before calling this code word event handlers like ContentControlBeforeDelete, ContentControlOnEnter and ContentControlOnExit must be removed otherwise word freezes(http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/50a96ba1-85e3-498f-89bb-4181220a565f).