Faq/Writer/155

Bug notice
Due to the following bug, the desired effect is impossible to achieve right now. If you know how to write and fix code, please don’t hesitate contacting us. The Document Foundation needs your help.

Everything that follows would not work unless the above-mentioned bug is fixed.

How to use private fields in the “Business Cards” window
You want to create “private” business cards using the menu. The Private tab seems ideal for capturing the information that should appear on the cards but, when a new document is first created, this data is not there.



The program does not build business cards out of nothing. 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 dialog box can integrate the data (surname, given name, etc.), only if the AutoText you are using contains User Fields that follow certain criteria.



As shown in the screenshot above, the dialog {{bc|File|New|Business Cards|AutoText - Section}} shows only a default category Business Cards, Work (3½ x 2). Similarly the menu {{bc|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 Business Cards window can use them?

The answer is given by inspecting a “professional” AutoText:
 * in a Writer document, go to {{bc|Tools|AutoText|Business Cards, Work}};
 * choose Elegant, with name, then click on Insert. Some example text appears;
 * go to {{bc|Insert|Fields|More Fields...}}. On the Variable tab, click on User Fields to display the list of fields created in this AutoText;



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.



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).