Created attachment 100238 [details]
example print makro
- create a database
- create a text-document with fields from the database
- create a basic-script to print via mailmerge to the selected pinter like attachment
the lines to change the printer
Dim myPrinter(0) as new com.sun.star.beans.PropertyValue
myPrinter(0).Name = "Name"
myPrinter(0).Value = "canon" 'not the standart printer
are not observed. It allways print to the standard printer
Adding self to CC if not already on
I don't understand "Adding self to CC", can you explain, please
(In reply to mario.edelmann from comment #2)
> I don't understand "Adding self to CC", can you explain, please
I just added myself to CC on a large number of database related bugs, nothing to worry about. Unfortunately, bugzilla informs everyone already signed up to the bug report about a minor change like that, so I thought I would explain what I did.
Setting the printer at the model seems to be the wrong way. The model used here is later replaced by the one loaded from
oMailMerge.DocumentURL = ConvertToUrl("D:\APPROACH\test.odt")
There's a property "PrintOptions" at the mail merge service to achieve the expected result.
it should be
oMailMerge.PrintOptions = myPrinter
Mario: did comment 4 solve it for you?
Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED INVALID, if the problem got solved.
We can look at this two ways :
- either as WFM because Oliver has proposed a workaround
- or else as a bug in the implementation of the mailmerge API which allows a printer model to be set programmatically, and then doesn't respect that choice, instead overriding it with that taken from a document (which is the default system printer by default)
I would be inclined to close this as WFM with Oliver's solution, and then if the OP feels it important enough, have him open a new bug report with regard to the API.