Button label change -> document changed -> save?

hello,
i ve a button which label is changed every seconds.
but now the document is every second changed and the history (undo) is messed up.
if i close the document without changing something, libreoffice ask to save.

do anybody know a workaround for the issue?

5.8.1.1. What if the file is modified?

Or undo manager?

1 Like

WoW,
thanks a lot for the answer.
the undomanager resolve the redo undo mess.
but one issue still exist:
every time the label is changed the document is an unsave state,
and want to get save after exit.
Some idea for this issue?

Isn’t Chapter 5.8.1.1. about that?

If (oDoc.isModified) Then oDoc.setModified(False)

But keep in mind - if the document has not changed because of your macro, but was actually changed intentionally, you will not receive a warning to save the changes. It’s up to you to decide if it’s worth the risk.

Hi,
thanks a lot, every question are answered.
the python script works as desired :slight_smile:

Thank you!