フォントを自分の好みに指定するマクロです。
例によって、記録しているだけですが、記録がうまくいかない時がありましたから、
一旦別の列を選択していますので、冗長になっています。
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(4) as new com.sun.star.beans.PropertyValue args1(0).Name = "CharFontName.StyleName" args1(0).Value = "" args1(1).Name = "CharFontName.Pitch" args1(1).Value = 2 args1(2).Name = "CharFontName.CharSet" args1(2).Value = -1 args1(3).Name = "CharFontName.Family" args1(3).Value = 5 args1(4).Name = "CharFontName.FamilyName" args1(4).Value = "Hiragino Kaku Gothic Pro W3" dispatcher.executeDispatch(document, ".uno:CharFontName", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(2) as new com.sun.star.beans.PropertyValue args2(0).Name = "FontHeight.Height" args2(0).Value = 10 args2(1).Name = "FontHeight.Prop" args2(1).Value = 100 args2(2).Name = "FontHeight.Diff" args2(2).Value = 0 dispatcher.executeDispatch(document, ".uno:FontHeight", "", 0, args2()) rem ---------------------------------------------------------------------- dim args3(0) as new com.sun.star.beans.PropertyValue args3(0).Name = "RowHeight" args3(0).Value = 750 dispatcher.executeDispatch(document, ".uno:RowHeight", "", 0, args3()) end sub
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー