Am 25.06.2011 21:32, schrieb lee:
Hi Lee
John B<johnb@email2.me> writes:
I have tried the mailmerge facility in LO and I as yet cannot get
anywhere with it.
Hm, it's not too difficult to get to the point where you could finally
save, print or send your documents. Just make sure that there are no
unmatched fields. As someone described, you can even drag and drop
fields from a database into your document.
I could use mailmerge if it would reliably send the documents rather
than sometimes say "0 of 0 messages sent" despite there are two messages
to be sent --- and if the PDF created that way wasn't messed up. And it
would even be really useful if changing the "properties" when sending
documents as PDF would work rather than crash LO.
If you are still interested in a reliable macro that can export to PDF
with a password I have coded some lines for You: (StarBasic code)
sub export_pdf_with_password
odoc=ThisComponent.CurrentController.Frame
sURL = "file:///C:/Users/Nansen/Documents/RundschreibenTest0096.pdf"
'variable to hold the Path
dim args1(5) as new com.sun.star.beans.PropertyValue
'args1(0).Name = "UseTaggedPDF"
'args1(0).Value= true
args1(0).Name = "ExportFormFields" 'just schow the contens of the Form.Filds
args1(0).Value= false
args1(1).Name = "Printing" ' you don't need that.
args1(1).Value= 2
args1(2).Name = "RestrictPermissions" 'If true, selects to restrict some
permissions. The permissions can be changed only when the user enters
the correct password.
args1(2).Value= true
args1(3).Name = "PermissionPassword"
args1(3).Value= "www2" 'coud be a variable
args1(4).Name = "EncryptFile" 'If true, selects to encrypt the PDF
document with a password. The PDF file can be opened only when the user
enters the correct password.
args1(4).Value= true
args1(5).Name = "DocumentOpenPassword"
args1(5).Value= "www" 'coud be a variable
'here you can enter some more options from the "
http://wiki.services.openoffice.org/wiki/API/Tutorials/PDF_export " if
you want
dim args2(2) as new com.sun.star.beans.PropertyValue
args2(0).Name = "FilterName"
args2(0).Value = "writer_pdf_Export"
args2(1).Name = "FilterData"
args2(1).Value = args1
thisComponent.storeToURL(sURL,args2())
end sub
I have done a complete solution for your hole problem (not totally
complete jett). I used a database (instead of a Calc file) .
I can send the solution to you but I think you have to reconnect the
Writer-document and the Database on your computer.
Regards Frieder
--
Unsubscribe instructions: E-mail to users+help@global.libreoffice.org
In case of problems unsubscribing, write to postmaster@documentfoundation.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
- Re: [libreoffice-users] Re: using fields in a text document (continued)
[libreoffice-users] Re: using fields in a text document · Alexander Thurgood
(message not available)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.