I have run into a very weird problem with printing from CALC with a macro. Usually CALC prints one sheet, then hangs, in Task Manager soffice.bin starts using entire CPU Core and I can see another sheet "buffering" in print queue.
Problem happens on different machines (all tested were running windows 7), different versions of AOO (4.1.5, 4.1.3) and LO (5.1.4, 5.4.4, 6.0.2), all macros were created with AOO API Guide.
On my machine AOO 4.1.3 prints fine, LO 6.0.2 hangs every time, also on my machine LO often hangs with manually invoked printing (Ctrl+P). On another machine AOO 4.1.5 hangs randomly while LO 5.4.4 prints fine, and on yet another machine LO 5.1.4 printed fine the other day, today it hung, and after restarting the machine it started printing fine again.
Printing is done with the following Basic code:
Code: Select all
oController.setActiveSheet(oSheet1)
ThisComponent.Print(Array())
Wait(500)
oController.setActiveSheet(oSheet2)
ThisComponent.Print(Array())
Wait(500)
ThisComponent.Print(Array())
Wait(500)
oController.setActiveSheet(oSheet3)
ThisComponent.Print(Array())
Wait(500)