4

I have a LO Calc spreadsheet to collect my invoices in. I would like to automagically fill a new writer doc from a specific template with the values from one row of the invoice spreadsheet.
Best would be to set the filename according to the calc values.

I would expect to do this with a macro, but don't have a specific idea how to open a spreadsheet from a template, or create a new document from a template from a calc macro. Is there a 'simple' way at all?

lars k.
  • 562
  • 4
  • 18

1 Answers1

-1

See section 5.8.4 of Andrew Pitonyak's Macro Document Create a new document from a template. Also, listing 5.43 (section 5.17) shows how to save a document with a particular filename.

Other places in the document show examples of reading cells from Calc and inserting Writer contents.

Jim K
  • 12,824
  • 2
  • 22
  • 51
  • Downvoted because I found this question because it asks _exactly_ the question. I want answered. Sadly, this answer only points to a document, rather than answering. On the plus, side, the answer _does_ quote precise section numbers. On the minus side, there's no *obvious* way on the linked site to browse the document by section number. – nurdglaw Aug 28 '19 at 14:36
  • 1
    @nurdglaw: If you want to learn LO macro programming, you need to download the document (AndrewMacro.odt, the first link on the page). Not sure what you are hoping for as far as "obvious," but how about the document's table of contents? Perhaps you were expecting a fancier web page, but Andrew's document is one of the most important resources used by the LO macro community, and you won't get far without becoming familiar with it. – Jim K Aug 28 '19 at 17:11