Frequently asked questions - Writer

From The Document Foundation Wiki
< Faq‎ | Writer
Jump to: navigation, search

How to use private fields in the "Business card" wizard

You wish to create "private" business cards using the menu File ▸ New ▸ Business Cards. The Private tab seems ideal for capturing the information thjat should apear on the cards but, when the document is created, this data is not reproduced.

copie d'écran dialogue cartes de visite
Cartes de visite

You need to understand that the wizard does not build business cards ex nihilo: each card is based on an AutoText. The following technique allows you to "design" your cards exactly as you want.
The AutoText is chosen in the "Business Cards" tab, but the wizard can integrate the data (surname, given name, etc.), only if the AutoText you are using contains User Fields that follow certain criteria. .

copie d'écran dialogue cartes de visite
Choix de l'AutoTexte

As shown in the screenshot above, the dialog File ▸ New ▸ Business Cards ▸ AutoText - Section shows only a default category Business Cards. Work (3.1/2x2). Similarly the menu Edit ▸ AutoText contains only the same default category.

The "trick" is to create new AutoTexts that contain the "right" fields. You can also create a new category "Private Business Cards" to store them in. How do you name these user fields so that the dialog will recognise them and the wizard can use them?

The answer is given by inspecting a "professional" AutoText:

  1. In a Writer document, go to Edit ▸ AutoText ▸ Business Cards. Work,
  2. Choose Elegant, with name, then click on Insert. Some example text appears.
  3. Go to Insert ▸ Fields ▸ Other. On the Variable tab, click on User Fields to display the list of fields created in this autoText :
copie d'écran dialogue Insertion Champs Autres
Champs utilisateurs "professionnels" disponibles dans l'AutoTexte

You can see in this screenshot that the names of most of the fields begin with BC_COMP_, but some (NAME and FIRSTNAME) begin with BC_PRIV_. It is clear that you need to insert user fields built on the same model, but replacing COMP by PRIV. Enter them by using the Name and Value boxes at the bottom.

copie d'écran autotexte avec champs utilisateur
Champs utilisateurs "privés" à créer dans l'AutoTexte

To delete the unwanted company field names, first delete the corresponding values in the text example. Then insert the new private fields where you want them, using the Insert button. The next screenshot shows the modified example text with the required fields. All you then need to do is select this text after creating it and use the Edit AutoText dialog to create an AutoText based on it (inserted for example in a new category "Private Business Cards" cf. above.

  • From now on, the Private tab in the wizard will be functional (if you have correctly chosen an AutoText containing these fields).