For find the Start and End carets of a TextBlock, that will work. However, I am trying to do that for a Run. Using:
RunCP currentRun = runCaret->GetCurrentRunCP();
will get the Start of the Run, but there is no equivalent "runCaret->GetCurrentRunEndCP()". I'm using this instead:
CaretPtr nextRun = runCaret->Clone(); if ( SUCCESS != nextRun->MoveToNextRun() ) nextRun = textBlock->CreateEndCaret();
but I'm getting a "linefeed" included when the Run is the last Run in a Paragraph.
Bruce