VisualBasic format RTF new line and bold

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
lukasz.krasniak
Newcomer
Posts: 1
Joined: Wed Dec 01, 2021 10:19 am

VisualBasic format RTF new line and bold

Post by lukasz.krasniak » Wed Dec 01, 2021 10:44 am

I have a problem with bolding individual words in RTF and moving to a new line in a variable stored in the database using VisualBasic.

My script when loading the form:

Code: Select all

Rem Convert dataset from previous action into CSV list
Bold = Replace(Replace(Bold, VbCrLf, ""), """", "") 

Rem Remove the first item in the list (it's a field name, not value)
Bold = Right(Bold, Len(Bold) - InStr(Bold, ","))
Script used in the RFT text:

Code: Select all

Result = FormatAllergens ([txt], [Bold], "bold,italic,underline")
In the text I should have the composition of the product, eg words in bold such as composition, additives, vitamins, etc. RTF does not want to reformat it.


What should I do to get instead of:
Extras (bold): here text and another bold element on the same line
to receive
Extras: text
Another bold element.

Post Reply