Track Changes Protect [closed]

asked 2018-06-06 08:52:27 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I need a help with "Track Changes" in Writer. I run macro with method uno:ProtectTraceChangeMode. But LibreOffice show me window with Enter and Confirm fields. Its OK. But I need automation protection of changes in document via macro. How I can set password in parameter for automation run Protect Changes of document? I found nothing details in UNO documentation about ProtectTraceChangeMode method. The main target: Enable\Disable Track Changes protect via macros without input password in GUI of LibreOffice My marco code:

sub Main 
dim document as object 
dim dispatcher as object 
rem get access to the document 
document = ThisComponent.CurrentController.Frame 
dispatcher = createUnoService("") 
dim args1(0) as new 
args1(0).Name = "ProtectTraceChangeMode" 
args1(0).Value = true 
dispatcher.executeDispatch(document, ".uno:ProtectTraceChangeMode", "", 0, args1()) 
end sub

Please, Help. Best regards, Lev Kudryashov.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-08-05 23:18:22.812454