OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Sending command pcl to the printer

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
juangm
Newbie
Newbie


Joined: 18 Nov 2004
Posts: 1

PostPosted: Mon Dec 13, 2004 12:10 am    Post subject: Sending command pcl to the printer Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group