[u-u] Zoom struggle last night

Dan Astoorian djast at ecf.utoronto.ca
Thu Jun 11 12:22:55 EDT 2020


On Thu, 11 Jun 2020 09:53:17 EDT, arocker at Vex.Net writes:
> 
> 
> I have a repertoire of 5 courses for a particular sponsor. When I invoice
> them, by an emailed .docx file), in Write I make a copy of the last
> invoice for that course, edit the current date, start and end dates of the
> course, and attache the saved file to a mail message. (As the courses are
> always the same length, the end date could be calculated from the start
> date.)

For the current date, you could do

    Ctrl-F2 (or Insert -> Field -> More Fields...)

then in the Document tab
- setting Type to "Date"
- setting Select to "Date" (as opposed to "Date (fixed)"
- setting Format to the desired date format

Once this is done, F9 should update the fields in the document.

However, this only works for dates that are a fixed offset of the
current date.

For dates that are not necessarily tied to the current date, you could
create a companion LibreOffice Calc spreadsheet and import the values
into the Writer document, but then you'd have to break the links before
sending the document (or else the recipient would be prompted about
updating the document from the external links), so that may not be what
you want.

What you can do is: at the point in the document where you want the
start date to appear:

Ctrl-F2 (or Insert -> Field -> More fields)
-> click on the Variables tab
-> use "Set variable" to create a variable.
   enter (e.g.) "startdate" in the Name field, and a date
   in the Value field.  Choose an appropriate date format under
   Additional formats -> Date -> Format.
-> click Insert.

Then, where you want the end date to appear:

Ctrl-F2 (or Insert -> Field -> More fields)
-> still on the Variables tab, "Insert formula"
-> choose an appropriate format under Additional formats -> Date -> Format
-> enter, e.g., "startdate + 6" in the Formula field to set the end date
six days after the start date.
-> click Insert (or press Enter)

Now, if you double-click on the first date and change it, the second
date will automatically change to 6 days after the date you entered.

Note that when you double-click on the date, the value that's displayed
in the dialog will probably be an integer, but you can still just type a
date (e.g., "June 11") into the Value field.

Note also that the "set variable" variable must precede the "insert
formula" field in the document in order for the formula to work.

This may be more work than entering the dates manually.

-- 
Dan Astoorian, Systems Administrator
Engineering Computing Facility
University of Toronto


More information about the u-u mailing list