juangm Newbie

Joined: 18 Nov 2004 Posts: 1
|
Posted: Mon Dec 13, 2004 12:10 am Post subject: Sending command pcl to the printer |
|
|
I write this macro:
"
sub imp1
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
Dim sImpresora as String
Dim sCopias as Integer
Dim oDocumento as Object
Dim oTexto as Object
Dim oCursorVista as Object
Dim oCursor as Object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDialogo.endExecute()
sImpresora = oDialogo.Model.ComboBox1.Text
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Printer"
args1(0).Value = sImpresora
dispatcher.executeDispatch(document, ".uno:Printer", "", 0, args1())
if oDialogo.Model.OptionButton1.State = 1 then
sCopias = 1
elseif oDialogo.Model.OptionButton2.State = 1 then
sCopias = 2
elseif oDialogo.Model.OptionButton3.State = 1 then
sCopias = 3
endif
rem ----------------------------------------------------------------------
dim args2(1) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Copies"
args2(0).Value = sCopias
args2(1).Name = "RangeText"
args2(1).Value = "1"
rem dispatcher.executeDispatch(document, ".uno:Print", 0, args2())
end sub
"
I want send command pcl to printer . As I can do it? |
|