A way to export only parts of a document

Every week i’ve to make a document for several people. They don’t need all information in the document, but a part. The export is halfway in the proces. Let’s say, A has to be exported and B ignored. The structure is like:

  • content part A
  • content part A
  • content part B
  • content part A
  • content part B
  • content part A
  • content part A
  • content part A
  • content part B

etc.

Now, i copy the whole content, remove all the content beloning to part B. But is there a way to do this quicker? Like, only export a particular style? Or ignore lines starting with ; etc etc ?

Maybe it’s not that automatic but you could export as pdf just including page ranges, for example: 1-10, 15-20. This will skip 11-14.

You could do this with Conditional Content.
Text, or paragraphs, or sections can all be made conditional based on some variable you define.

For example you could create a hidden field on the first page which contains a variable which you define such as PartA or PartB, or whatever.

Then when you print your document you simply change the hidden variable to get just the conditional content you want included in the document.

That a look at the LibreOffice 4.2 Writer Guide, Developing conditional content starting on page 412.

Tip: download the Writer Guide ODT file and Export to PDF with bookmarks.
Makes it much easier to find things with bookmarks.

.