[Solved] Labels with mixed bold & normal fonts in textboxes

Discuss the spreadsheet application
Post Reply
LabelMonster
Posts: 1
Joined: Thu Sep 23, 2021 7:12 pm

[Solved] Labels with mixed bold & normal fonts in textboxes

Post by LabelMonster »

I try to be as short as possible but might end up too long for anyone to read. Sorry about that.

We've been using oo Calc to print our labels which we stick on our food items like sandwiches, baguettes, salad boxes etc... These labels come on A4 sheets with 12 on each sheet. (2 columns of 6) Each label has 2 fields. Main field shows the name of the item and the other one shows the ingredients. Something like this to keep it simple: HAM AND CHEESE SANDWICH - Ham, Cheese, Mayo, Bread (everything else is pre printed on the labels) I've created a relatively simple Calc document with a few sheets for this job. This has been working fine for us so far for a few years. I'm sure there is a better way but the way I did it was that there is a sheet with cells of the names of the items and cells next to them with the matching ingredients. On another sheet there are 12 drop down lists where one can select the names to be printed on each label. Then there is a third sheet on which there are 24 text boxes arranged in a way to match the relevant fields on the labels when printed. Once one name is selected on the previous sheet that appears in the matching textbox on this sheet with the ingredients appearing automatically next to the name in the next textbox. Once all 12 textboxes are filled with names (and the corresponding 12 smaller text boxes filled automatically with the ingredients) it is ready to be printed. Then we just load the empty A4 label sheet to the printer and press print. Et voila we have a full sheet of printed labels with names with matching ingredients.
Alright if you're still here and managed to understand what I'm trying to say here comes my problem:
In the UK from next month every single food item we sell must be labelled in such a way that it shows EVERY single ingredients with the main 14 allergens printed in BOLD. (or underlined or different colour but it's the same issue).
I tried to redesign the labels to accommodate the long list of ingredients. Might have to go with a larger label. That's no problem. Problem is that the Bold words do not copy to the textbox.
I'm not sure if it can be done some way. I've searched the forum found some solutions but mostly in the Writer environment. Tried a few basic macros. Managed to change fonts of certain words to bold. But again only in the Writer environment not in a text box. The way I planned to do it was to fill in all the text boxes as before then run a small macro which would find the 14 words and change them to bold.
Anyone with some experience and knowledge could please let me know if you think this can be done either the way I planned or any other way?
If you all say no then I'll have to give up wasting time going down this road.
THANK YOU
Attachments
These are the text boxes with the names and ingredients.
These are the text boxes with the names and ingredients.
This is the sheet to choose what goes on each label
This is the sheet to choose what goes on each label
This is the list containing every names and ingredients
This is the list containing every names and ingredients
OpenOffice 4.1.2 Win 10
User avatar
MrProgrammer
Moderator
Posts: 4896
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Label printing with mixed bold and normal fonts in textb

Post by MrProgrammer »

LabelMonster wrote:In the UK from next month every single food item we sell must be labelled in such a way that it shows EVERY single ingredients with the main 14 allergens printed in BOLD. (or underlined or different colour but it's the same issue).
Disclaimer: I hardly ever use the Form Controls in a Calc document (Check Box, Text Box, Option Button, etc.).

I think the problem is that bold formatting does not apply to the textbox. However, Unicode provides bold letters in the range U+1D5D4 to U+1D607. You can write your allergens in these characters. They are intrinsicly bold and do not require formatting to make them so.
The forum does not allow these Unicode bold characters in a topic, so I have to post this an an image; click to see more detail
The forum does not allow these Unicode bold characters in a topic, so I have to post this an an image; click to see more detail
Unicode input in Linux, MacOS, and Windows

If Unicode input is difficult for you, you can use my Normal-to-Bold translator.
202110061824.ods
(16.87 KiB) Downloaded 94 times
 Edit: I create labels with Mail Merge (File → New → Labels), and that process does not involve hard-to-use form controls. Read about Mail Merge in Help → Index or in User Guides (PDF) or searching for topics about this feature in the Calc Forum or Writer Forum.

If you want to create your labels with text boxes, you can use formatting in them if you set control property Text Type to Multi-line with Formatting. 
If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Post Reply