Additionally, if you run this code on a SynEdit that has never had any text in it (e.i. create it at run time, Lines.Count will be zero), then SetTextBetweenPonits will NOT adjust BlockBegin and BlockEnd at all: they will remain (1,1) at all times. -- Bart