I have written hundreds of macros in Word, and read Michael Pitonyak’s excellent book.
However I am mystified at what many of the terms that show up in a macro that results from recording the macro below to increase the space before a paragraph to 0.2cm. Pityonyak’s book explains statements, functions and structures of Basic, but not terms like those I have put in Bold (ie triple ***) in the Macro below.
I’m not asking you to explain all these terms in a response, but tell me where I can find documentation of them and how to know what to include when writing a macro myself.
Thanks
sub ParagraphSpaceAbove1
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim ***dispatcher*** as object
rem ----------------------------------------------------------------------
rem get access to the document
document = .***CurrentController***.***Frame***
dispatcher = ***createUnoService("com.sun.star.frame.DispatchHelper"***)
rem ----------------------------------------------------------------------
dim ***args1(4) as new com.sun.star.beans.PropertyValue***
***args1(0).Name*** = "TopBottomMargin.TopMargin"
***args1(0).Value*** = 199 ***HOW DOES 0.2CM BECOME 199***
args1(1).Name = "TopBottomMargin.BottomMargin"
args1(1).Value = 0
args1(2).Name = "TopBottomMargin.ContextMargin"
args1(2).Value = false
args1(3).Name = "***TopBottomMargin.TopRelMargin***"
args1(3).Value = 100
args1(4).Name = "TopBottomMargin.BottomRelMargin"
args1(4).Value = 100
***dispatcher.executeDispatch(document, ".uno:TopBottomMargin", "", 0, args1())***
rem ----------------------------------------------------------------------
dim ***args2(0) as new com.sun.star.beans.PropertyValue***
***args2(0).Name = "NumberingStart"***
***args2(0).Value = false***
***dispatcher.executeDispatch(document, ".uno:NumberingStart", "", 0, args2())***
rem ----------------------------------------------------------------------
***dim args3(0) as new com.sun.star.beans.PropertyValue***
***args3(0).Name = "NumNewStartAt"***
***args3(0).Value = 65535***
***dispatcher.executeDispatch(document, ".uno:NumNewStartAt", "", 0, args3())***
end sub