1
我正在用vb6快速創建一個Calc文檔。當我打印時,我需要在每頁中重複1行和1列。在OpenOffice Calc中以編程方式更改打印區域
這是代碼:
Dim mPrintOptions(2) As Object
Dim OO_Dispatcher As Object
Set OO_Dispatcher = oServiceManager.createInstance("com.sun.star.frame.DispatchHelper")
Set mPrintOptions(0) = MakePropertyValue(oServiceManager, "PrintArea", "")
Set mPrintOptions(1) = MakePropertyValue(oServiceManager, "PrintRepeatRow", "$A$2")
Set mPrintOptions(2) = MakePropertyValue(oServiceManager, "PrintRepeatCol", "$A$1")
OO_Dispatcher.executeDispatch oDeskTop, ".uno:ChangePrintArea", "", 0, mPrintOptions
我有了這個代碼保存的文檔中作出的宏。
服務管理器和桌面對象先前已實例化。文檔創建正常,但是當我將它發送到打印機時,我不重複上面指定的行和列。