[api-dev] MailMerge = CommandType.COMMAND

2005-02-16 Thread Tom Schindl
Hi,
does anybody now how the fields in a writer-doc have to be named when 
using the code todo an automatic mail-merge?

---8---
Object dbContext = xMSF.createInstance(com.sun.star.sdb.DatabaseContext);
XNameAccess nameAccess =
(XNameAccess)UnoRuntime.queryInterface(XNameAccess.class, dbContext);
Object dataSource = nameAccess.getByName(mailMerge);
if( dataSource != null ) {
Object mService =
xMCF.createInstanceWithContext(com.sun.star.text.MailMerge,
xComponentContext);
System.out.println(Before Query is registered!);
registerQuery(dataSource);
System.out.println(Query is registered!);
XPropertySet oObjProps =
(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, mService);
oObjProps.setPropertyValue(DataSourceName, mailMerge);
oObjProps.setPropertyValue(Command, SELECT a, b FROM bla );
oObjProps.setPropertyValue(CommandType,new
Integer(com.sun.star.sdb.CommandType.COMMAND));
oObjProps.setPropertyValue(OutputType,new
Short(com.sun.star.text.MailMergeType.PRINTER));
oObjProps.setPropertyValue(DocumentURL, templateFile);
XJob job = (XJob) UnoRuntime.queryInterface(XJob.class, mService);
System.out.println(Print job is getting started!);
try {
job.execute(new NamedValue[0]);
System.out.println(Print job is started!);
}
catch (com.sun.star.lang.IllegalArgumentException iae) {
System.err.println(Caught IllegalArgumentException:  + iae);
}
catch (com.sun.star.uno.Exception e) {
System.err.println(Caught UNO Exception:  + e);
}
---8---
The main problem is that I don't want OO to pop-up and that's why I can 
register a query because it needs an opened OO-Window.

When using an registered Query the field holds myquery.a, myquery.b is 
there any default?

Tom
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[api-dev] draw_html_export

2005-02-16 Thread A . Portale
Return Receipt
   
   Your   [api-dev] draw_html_export   
   document:   
   
   wasAlessandro Portale/Minosse   
   received
   by: 
   
   at:16/02/2005 17.19.00  
   





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] How to open a database form

2005-02-16 Thread Mathias Röllig
Hi Frank,

Am 16.02.2005 13:53 schrieb Frank Schönheit - Sun Microsystems, Inc.:

 Is there a way to link writer documents (form document) to a database?
 I can't see it ...

 No, the Links (or Verknüpfungen in your version) are not available
 anymore. The idea is that you now store your text documents in the
 database document (and don't let confuse you that they're called
 forms, you of course have the full power of Writer at your disposal :).

Yes, but if i would attach basic macros the document wants to save as a
separately writer document. Or have i made a mistake?

greetings
Mathias
-- 
·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-8·-·

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]