Posted 18 January 2024, 7:36 pm EST
- Updated 18 January 2024, 7:41 pm EST
Hi Nitin,
As you can see in the picture. i can print the text between brakets in Red. The problem also as you can is the font, the allignement and the space an the beginning end between the black text and the red text. I do not know where it comes from.
with RTF Field is my first experience
hier is the code i use under Details.OnFormat:
'Define the braket start/end
VInStart = Instr(fldRohstoff.Text, “(”)
VInEnde = Instr(fldRohstoff.Text, “)”)
If VInStart > 0 Then
'Red Color
Value1 = Mid(fldRohstoff.Text, 1, VInStart - 2)
Value2 = Mid(fldRohstoff.Text, VInStart - 1, VInEnde - 1)
fldRohstoff.Text = “{\rtf1
{\fonttbl
{\f0\fcharset1 Arial; }
}
{\colortbl;\black;\red255\green0\blue0; }
\cf1 \pard \fs30 \b “&[Value1]&”
{\fonttbl
{\f0\fcharset1 Arial;\b bold\b0; }} \cf2 \fs30 \b “&[Value2]&”}”
Else
'all in black
EndIf
Best regards
Said