Nicole,
if you hold your cursor over CHARFORMAT2 it will show a pop-up note: type CHARFORMAT2 = CHARFORMAT2A = _charformat2a =
record; C:\lazarus\fpc\3.2.0\source\packages\winunits-base\src\richedit.pp(953,6)
RichEdit.pp is the RichEdit unit.
So if you don't have RichEdit and/or RichMemoUtils in your USES clause ... they need to be there.
Rick