Suppose have a example:
Sub TPrint(Optional PrintedDoc as Object)
' For testing on already open document:
If IsMissing(PrintedDoc) Then PrintedDoc=ThisComponent
DocFrame=PrintedDoc.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args0(0) as new com.sun.star.beans.PropertyValue
dim args1(0) as new com.sun.star.beans.PropertyValue
dim args2(0) as new com.sun.star.beans.PropertyValue
' When we do:
dispatcher.executeDispatch(DocFrame, ".uno:Print", "", 0, args0())
' then the printing menu with preview opens for manual intervention, but if the argument list is properly initialized:
args1(0).Name = "RangeText"
args1(0).Value = "2,1"
dispatcher.executeDispatch(DocFrame, ".uno:Print", "", 0, args1())
' ...then the printout is made automatically, without the possibility of manual intervention.
' Also the method .print is "direct":
args2(0).Name = "Pages"
args2(0).Value = "2,1"
PrintedDoc.print args2()
End Sub
What do i need: open the printing panel (the same where opens after selecting “print” from LibreOffice menu) just like when calling the dispatcher with uninitialized argument list, BUT with arguments (first of all the page list) preloaded to the manual panel. I want the great existing (multipage available) print (graphics) preview, but with the initial values are loaded. How to do it?