Using LO Version: 5.0.2.2 on iMac with OSX 10.10.5
I have a need to get and set these document custom properties:
I used the record a macro facility whist changing displayCopyright from Yes to No.
This is the macro code I got:
REM ***** BASIC *****
sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(9) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Properties.UseUserData"
args1(0).Value = true
args1(1).Name = "Properties.DeleteUserData"
args1(1).Value = false
args1(2).Name = "Properties.Title"
args1(2).Value = "SecretaryBird template"
args1(3).Name = "Properties.Subject"
args1(3).Value = ""
args1(4).Name = "Properties.KeyWords"
args1(4).Value = ""
args1(5).Name = "Properties.Description"
args1(5).Value = ""
args1(6).Name = "Properties.AutoReload"
args1(6).Value = false
args1(7).Name = "Properties.AutoReloadTime"
args1(7).Value = 0
args1(8).Name = "Properties.AutoReloadURL"
args1(8).Value = ""
args1(9).Name = "Properties.AutoReloadFrame"
args1(9).Value = ""
dispatcher.executeDispatch(document, ".uno:SetDocumentProperties", "", 0, args1())
end sub
Which is NOT a lot of help!
Can anyone give me any pointers/suggestions?