Issue 113120 - macro with mailmerge & PDF attachment
Summary: macro with mailmerge & PDF attachment
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-13 10:45 UTC by edonia
Modified: 2017-05-20 11:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description edonia 2010-07-13 10:45:39 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_pdf
	Dim MailMerge as Object
	Dim DocumentURL as String
	Dim bodytext as String
	
	bodytext = "Hallo," & Chr(13) & Chr(13) & "blah"
	MailMerge = createunoservice("com.sun.star.text.MailMerge")
	Mailmerge.DataSourceName = "db-cn-mysql"
	
	MailMerge.CommandType = com.sun.star.sdb.CommandType.QUERY
	MailMerge.Command = "my query"
	MailMerge.DocumentURL = ConvertToUrl("/path_to_doc/mydoc.ott")
	MailMerge.OutputType = 3
	MailMerge.Subject = "my subject"
	MailMerge.MailBody=bodytext
	MailMerge.AddressFromColumn = "email"
	MailMerge.SendAsAttachment = 1
	MailMerge.AttachmentName = "file.pdf"
	MailMerge.AttachmentFilter = "writer_pdf_Export"

	MailMerge.execute(Array())
	MailMerge.Dispose()
End Sub


By executing, I do have a quite different behaviour each time. All seems to work
fine, except the creation of the PDF file. It seem, that the files got send
before the creation is finished.
Sometimes only the bold text is in the attachment, sometimes only the normal
formatted text, sometimes no text, sometimes all text.
The missing text in the PDF file is invisible, I can mark it, copy and paste it
to an editor. It seems, the Text is behind the page.

If I use the GUI to mailmerge with the same options, it is working without any
problems.
Comment 1 kay.ramme 2010-07-27 15:39:02 UTC
Olli, please have a look.
Comment 2 Marcus 2017-05-20 11:27:50 UTC
Reset assigne to the default "issues@openoffice.apache.org".