Frieder <delorfr@googlemail.com> writes:
Am 24.06.2011 18:28, schrieb lee:
while(webpages) {
check out the web page
decide whether to send my document or not
if(I send it) {
create a new directory to save the document in // this is already
// automated by a
// shell script
paste a unique reference number generated by the shell script into
the document
copy and paste some data like a company name and address and a
persons name into the document
adjust the salutation as needed
go to another place in the document and enter the companys name and
city
save the document in the directory created by the shell script with
a meaningful file name (like "<documentname>-<company>")
export the document as pdf with a permissions password set
create an email by editing an email template appropriately to send
the pdf file by email
save the webpage in the same directory as the LO document
make a note in a text file that the document was sent in response to
the particular web page
}
}
I can hear this crying for (at least some more) automation from 10 miles
away ...
[...]
ther is a Basic example for a macro to export to PDF
its not clean code, but it should work:
[...]
if you want I can translate this code in clean code without using the
dispatcher
Hm, I just tried out the macro recorder and recorded a macro that
exports my document as PDF. It looks very much like the one you
posted. It even stores the permissions password I entered in readable
form.
It strikes me odd that I shall have to learn another programming
language to do something this simple ... Anyway, what bothers me the
most at the moment is this bug with all the fields disappearing from
data sources: Even if I don't enter more than one data set into a data
source through a form and some programming, I won't get anywhere when
the fields of the data source eventually disappear.
Hm. I can't even register a data source as described in the
documentation[1]. The only available selection the wizard offers is
"Other external data source", and selecting that and trying to get to
the next page of the wizard brings up an error message:
,----
| SQL Status: HY000
|
| The connection to the external data source could not be established. No
| SDBC driver was found for the given URL.
|
| A connection for the following URL was requested
| "sdbc:address:evolution:local".
`----
So is it trying to use some data from Evolution? I don't have Evolution
installed.
Hm. I have created a database to use instead of a spreadsheet. When I'm
trying to mail the document to myself as PDF, I can specify "Properties"
in the mailmerge wizard. There I could apparently add a text message so
that the PDF is sent as an attachment to it. I could use that to mail
the PDF documents to myself with the reference number in the text part
for easy further processing, or I might even be able to send them
without any further processing.
Unfortunately, LO crashes when I try to send the message:
,----
| X Error: BadMatch (invalid parameter attributes) 8
| Major opcode: 42 (X_SetInputFocus)
| Resource id: 0x5001822
| #
| # A fatal error has been detected by the Java Runtime Environment:
| #
| # SIGSEGV (0xb) at pc=0x00007f2cabeb5751, pid=21389, tid=139829845436192
| #
| # JRE version: 6.0_18-b18
| # Java VM: OpenJDK 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 )
| # Derivative: IcedTea6 1.8.7
| # Distribution: Debian GNU/Linux unstable (sid), package 6b18-1.8.7-4
| # Problematic frame:
| # C [libuno_sal.so.3+0x43751] rtl_uString_release+0x1
| #
| # An error report file with more information is saved as:
| # /home/lee/hs_err_pid21389.log
| #
| # If you would like to submit a bug report, please include
| # instructions how to reproduce the bug and visit:
| # http://icedtea.classpath.org/bugzilla
| #
|
| [error occurred during error reporting , id 0xb]
`----
It doesn't seem worthwhile to put any effort into programming when
everything that uses datasources is buggy in one way or another,
especially since the mailmerge tool would do a lot of what I want if it
would work.
So what's the alternative to LO? Can I convert my document to koffice?
Is koffice any better?
LaTeX would be my favourite choice; it's only too long ago I used it
last time, and when I tried more recently, I didn't manage to figure out
how to create tables that go across several pages and contain
tables. Perhaps I should give that another try; the result would look
much better anyway ...
[1]: http://wiki.documentfoundation.org/cgi_img_auth.php/0/05/0211WG3-UsingMailMerge.pdf
--
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] using fields in a text document (continued)
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.