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

Need Mailmerge resultfiles with text instead of fields

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


Joined: 15 Jun 2005
Posts: 22

PostPosted: Tue Jun 21, 2005 2:42 am    Post subject: Need Mailmerge resultfiles with text instead of fields Reply with quote

I use a MySQL Dataabase at source.I have somedatabasefields and some conditional field in the letter And create the lettes per macro. Everything fine so far.

When I open the letter everything works fine. As soon as i click onto the send per email as pdf button, the conditional field always shows the ELSE case. If I reinsert the data by Hand using the DB functions it shows the right result again. I tried to use the syntax: "[database.query.field]" aswell as "field", both work with the mailmerge, both end with the wrong case.

I submitted a bug report allready. I think, this is a bug, I can reproduce it with diffrent querys and documents.

My Question
How can I work arround this problem?If I create a mailmerge by hand the result letters are text only and don't include any field. My code always creates letters with all fields which is not necerccery here is my code:

Code:
   Dim oProps as Object
   oPathSettings = CreateUnoService( "com.sun.star.util.PathSettings" )
    oMerge = createunoservice("com.sun.star.text.MailMerge")
   oMerge.DocumentURL = ConvertToUrl(DocPath & "letter.odt")
   oMerge.DataSourceName = "mydatabase"
   oMerge.CommandType = 1
   oMerge.Command = "MyQuery"
   oMerge.OutputType = 2
   oMerge.OutputUrl = ConvertToUrl(DocPath)
   oMerge.FileNameFromColumn = False
   oMerge.Filenameprefix = "mymergedletters"
   oMerge.execute(oProps())
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