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

Delphi7 and OpenOffice Writer

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
Anateus
Newbie
Newbie


Joined: 08 Dec 2004
Posts: 2

PostPosted: Wed Dec 08, 2004 11:32 pm    Post subject: Delphi7 and OpenOffice Writer Reply with quote

Question
Hallo,

I program with Delphi7 an OOo Document.
I can select a printer with following source:

vPrinterParams := VarArrayCreate([0,7], varVariant);
vPrinterOps := VarArrayCreate([0,3], varVariant);
vCoreReflection := vSvcMgr.createInstance('com.sun.star.reflection.CoreReflection');
vCoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(vPropertyValue);
vPrinterParams:=vDoc.GetPrinter;
vPrinterParams[0].Value := Drucker_Name;
vPrinterParams[0].Name := 'Name';
vDoc.SetPrinter(vPrinterParams);

But I can't select a tray.
How can I select a tray with Delphi?
Can you help me?

Thanks.
Harald
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Thu Dec 09, 2004 9:15 am    Post subject: Reply with quote

I don't know if this will help or not.



Selecting paper tray
====================
http://www.oooforum.org/forum/viewtopic.php?t=3018

Name of active printer
======================
http://www.oooforum.org/forum/viewtopic.php?t=4981
http://www.oooforum.org/forum/viewtopic.php?t=4997

Waiting on busy printer
=======================
http://www.oooforum.org/forum/viewtopic.php?t=4922
Property name="Wait" value=True
http://api.openoffice.org/servlets/ReadMsg?list=dev&msgId=1031906
Get error when closing document after print,
must wait until printing completes...
http://www.oooforum.org/forum/viewtopic.php?t=6228

Printing a document
===================
http://www.oooforum.org/forum/viewtopic.php?t=6040
http://www.oooforum.org/forum/viewtopic.php?t=3620
http://www.oooforum.org/forum/viewtopic.php?t=5124

Printing selected pages
=======================
http://www.oooforum.org/forum/viewtopic.php?t=6188

Display Printer dialog box
==========================
http://www.oooforum.org/forum/viewtopic.php?t=6049
http://www.oooforum.org/forum/viewtopic.php?t=3131
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Anateus
Newbie
Newbie


Joined: 08 Dec 2004
Posts: 2

PostPosted: Fri Dec 17, 2004 3:15 am    Post subject: Reply with quote

I have now insert the following source, but I become error with
EOleException "com.sun.star.uno.Exception.
What can I do?

vPrinterParams := VarArrayCreate([0,7], varVariant);
vPrinterOps := VarArrayCreate([0,3], varVariant);
vCoreReflection := vSvcMgr.createInstance('com.sun.star.reflection.CoreReflection');
vCoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(vPropertyValue);
vPrinterParams:=vDoc.GetPrinter;
vPrinterParams[0].Value := Drucker_Name;
vPrinterParams[0].Name := 'Name';
//------------------
sPageFirst:= 'First Page';
sPage:= 'Standard';
oPageStyleFirst:= vDoc.StyleFamilies.GetByName('PageStyles').GetByName(sPageFirst);
oPageStyle:= vDoc.StyleFamilies.GetByName('PageStyles').GetByName(sPage);
sTray := 'Tray 3';
oPageStyleFirst.PrinterPaperTray:= sTray;
oPageStyle.PrinterPaperTray:= sTray;
//------------------
vDoc.SetPrinter(vPrinterParams);
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 Writer 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