Apache OpenOffice (AOO) Bugzilla – Issue 113118
macro with mailmerge & mysql trows last DB row
Last modified: 2017-05-20 11:29:44 UTC
I'm working with OOo 3.2.0 on ubuntu 10.04 and mysql 5.1.41 I have a macro with the following code: Sub serienbrief Dim MailMerge as Object Dim DocumentURL as String MailMerge = createunoservice("com.sun.star.text.MailMerge") Mailmerge.DataSourceName="db-cn-mysql" MailMerge.DocumentURL=ConvertToUrl("/path_to_doc/mydoc.ott") MailMerge.CommandType=1 MailMerge.Command="my query" MailMerge.OutputType=3 MailMerge.Subject="my subject" MailMerge.AddressFromColumn="email" MailMerge.SendAsAttachment=0 MailMerge.execute(Array()) MailMerge.Dispose() End Sub The database is an mysql DB, the connector mysql(native). If I run this basic, the last row from the DB are not used. If I do open the query, all entries of the query are shown. If I do send a mailmerge, with the GUI, all entries in the query get an mail. Using this marco, all entries except the last in the query get an email.
Ocke, please have a look.
Could you please have a look at it or delegate it? Thanks. I don't know who is responsible for that.
->edonia: To find the reason it would be helpful if you could provide some additional information. - Instead of output to email try to output to file (needs OutputType=1, and OutputURL set). Does this resulting file contain all entries? - If the former works try with SaveAsSingleFile = True. - If both fail try to use the bibliography data as data source.
Reset assigne to the default "issues@openoffice.apache.org".