Текст макроса:
sub Title
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 ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertRowsBefore", "", 0, Array())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = "$A$1"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "StringName"
args3(0).Value = "Book Title"
dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "StringName"
args4(0).Value = "Country of origin"
dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args4())
rem ----------------------------------------------------------------------
dim args5(0) as new com.sun.star.beans.PropertyValue
args5(0).Name = "StringName"
args5(0).Value = "Value, USD"
dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args5())
rem ----------------------------------------------------------------------
dim args6(0) as new com.sun.star.beans.PropertyValue
args6(0).Name = "ToPoint"
args6(0).Value = "$A$1"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args6())
rem ----------------------------------------------------------------------
dim args7(2) as new com.sun.star.beans.PropertyValue
args7(0).Name = "FontHeight.Height"
args7(0).Value = 8
args7(1).Name = "FontHeight.Prop"
args7(1).Value = 100
args7(2).Name = "FontHeight.Diff"
args7(2).Value = 0
dispatcher.executeDispatch(document, ".uno:FontHeight", "", 0, args7())
rem ----------------------------------------------------------------------
dim args8(0) as new com.sun.star.beans.PropertyValue
args8(0).Name = "Bold"
args8(0).Value = true
dispatcher.executeDispatch(document, ".uno:Bold", "", 0, args8())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FontHeightCJK", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FontHeightCTL", "", 0, Array())
rem ----------------------------------------------------------------------
dim args11(0) as new com.sun.star.beans.PropertyValue
args11(0).Name = "HorizontalJustification"
args11(0).Value = com.sun.star.table.CellHoriJustify.CENTER
dispatcher.executeDispatch(document, ".uno:HorizontalJustification", "", 0, args11())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:BorderTLBR", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:BorderBLTR", "", 0, Array())
rem ----------------------------------------------------------------------
dim args14(0) as new com.sun.star.beans.PropertyValue
args14(0).Name = "ToPoint"
args14(0).Value = "$B$1"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args14())
rem ----------------------------------------------------------------------
dim args15(2) as new com.sun.star.beans.PropertyValue
args15(0).Name = "FontHeight.Height"
args15(0).Value = 8
args15(1).Name = "FontHeight.Prop"
args15(1).Value = 100
args15(2).Name = "FontHeight.Diff"
args15(2).Value = 0
dispatcher.executeDispatch(document, ".uno:FontHeight", "", 0, args15())
rem ----------------------------------------------------------------------
dim args16(0) as new com.sun.star.beans.PropertyValue
args16(0).Name = "Bold"
args16(0).Value = true
dispatcher.executeDispatch(document, ".uno:Bold", "", 0, args16())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FontHeightCJK", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FontHeightCTL", "", 0, Array())
rem ----------------------------------------------------------------------
dim args19(0) as new com.sun.star.beans.PropertyValue
args19(0).Name = "HorizontalJustification"
args19(0).Value = com.sun.star.table.CellHoriJustify.CENTER
dispatcher.executeDispatch(document, ".uno:HorizontalJustification", "", 0, args19())
rem ----------------------------------------------------------------------
dim args20(0) as new com.sun.star.beans.PropertyValue
args20(0).Name = "ToPoint"
args20(0).Value = "$D$1"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args20())
rem ----------------------------------------------------------------------
dim args21(2) as new com.sun.star.beans.PropertyValue
args21(0).Name = "FontHeight.Height"
args21(0).Value = 8
args21(1).Name = "FontHeight.Prop"
args21(1).Value = 100
args21(2).Name = "FontHeight.Diff"
args21(2).Value = 0
dispatcher.executeDispatch(document, ".uno:FontHeight", "", 0, args21())
rem ----------------------------------------------------------------------
dim args22(0) as new com.sun.star.beans.PropertyValue
args22(0).Name = "Bold"
args22(0).Value = true
dispatcher.executeDispatch(document, ".uno:Bold", "", 0, args22())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FontHeightCJK", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FontHeightCTL", "", 0, Array())
rem ----------------------------------------------------------------------
dim args25(0) as new com.sun.star.beans.PropertyValue
args25(0).Name = "HorizontalJustification"
args25(0).Value = com.sun.star.table.CellHoriJustify.CENTER
dispatcher.executeDispatch(document, ".uno:HorizontalJustification", "", 0, args25())
end sub