Hello,
I wrote this simple macro. I’m not a macro-expert so maybe I’m doing something wrong here.
What the macro should do is reset the revision number (EditingCycles) and the total editing time (EditingDuration) of a document.
By setting EditingCycles to 0 before saving the document, the amount of EditingCycles when saving the document will be raised with 1. Therefore the revision number will be 1. This works great. However, I can’t find the right way to set EditingDuration (the total editing time) to 0 (00:00:00). When I manually execute the macro and then look at the document properties, the total editing time is indeed reset to 0 (yahooo!). However when I save the document, the original editing time re-appears while it still should be 0 (boooo!).
Does anyone with macro expertism know what I’m doing wrong? Any help would be very very welcome. Here is the macro:
Sub ResetMetadata
Dim DocumentProperties As Object
DocumentProperties = ThisComponent.getDocumentProperties()
DocumentProperties.EditingCycles = 0
DocumentProperties.EditingDuration = 0
End Sub