Formatting, tool or another application?

enter code here

This problem may not be possible with libre-office and my asking the question may only serve to illuminate my ignorance of libre-office. I have poured over the forums and wiki without finding what I am looking for.

Picture this - I have a template/document with five words or phrases that appear formatted like links so they can be clicked on. For example:

apple bar rug office car

I would like to open this template and be able to click on the words I want to stay, while the ones I do not click on disappear from the final document. So I click on apple and rug for example and the final document would only show:
apple rug

If this is possible, I would build a comprehensive multiple page template with all the options that are possible so I can quickly click down through and the final saved document would have only what I selected.

I thank you for considering.

EDIT*
I also posted the question (asked differently after thinking about it and with more trial/error in the openoffice forums here)

Mike

Are you trying to build a document from a dictionary of “standard” clauses, like a contract? Will the clauses be edited before saving? In this restricted case, there is a possible solution.

I’m trying to make a template to use when a patient visits me. For example one of the lines might be:

“Patient follows up for treatment of - depression anxiety ADHD.”

When I open the template, I want to be able to click one or multiple choices (depression anxiety or ADHD) and have a final document with what I clicked.

If I click depression and ADHD, the output on final document should be:

Patient follows up for treatment of - depression ADHD.

I hope that makes sense.

It makes sense: looks like you have many many (repetition is not a typo) short clauses. I was thinking about a master document from which you’d exclude included sub-docs but it isn’t applicable to your case.

Maybe you should try with Calc (instead of Writer) where your click in a cell or checkbox would hide the line or cause some other “visible” actions (e.g. with conditional formatting, change foreground color to backgroung color), thus making text invisible but revertible.

@michael4444:
It isn’t “illegal” to cross-post a question in two or even more places. It is, however, regarded “netiquette” to link-in the alternative postings. Otherwise contributors may miss informazion or waste their time on solved problems.
See Help with creating a template...unique feature (View topic) • Apache OpenOffice Community Forum
In addition you should thoroughly choose your subject. In this case you used two very different wordings. Wouldn’t have expected the same question under both of them.

This is a good task for LibreOffice. Here is one approach using buttons and macros.

click on optional words.ott

When a button is clicked, the macro goes to the bookmark for question 1 (see Insert → Bookmark) and then adds the word. After the words are all selected, press “Remove All Buttons” and then the document is finished.

You may want to modify the macros to add improvements such as checking for duplicates.

Buttons only work when Design Mode is turned off (Edit → Design Mode in the menu).

One disadvantage of this setup is that it may be tedious to create all the buttons. A way around this is to put the words in Calc using =HYPERLINK(). Both the Writer template and the Calc file would need to be open at the same time.