How to define the offset for a textrange (after a TAB)?
Dear experts,
I want to grab the part after TAB in a paragraph, for example from
Something TAB rest of the paragraph using some character formatting.
I have no clue how to find the value for the offset.
Converting the pgf to text and then look for the TAB will obviously provide a wrong value - or not?
Will it be necessary to iterate through the paragraph (moving the text range from char to char) to find the item behind the TAB?
Can You please enlighten me ?
var doc = app.ActiveDoc;
var mainflow = doc.MainFlowInDoc;
var tframe = mainflow.FirstTextFrameInFlow;
var pgf = tframe.FirstPgf;
GetPgfPartAfterTAB (pgf);
function GetPgfPartAfterTAB (oPgf) {
var oDoc = app.ActiveDoc;
var tRange= new TextRange();
tRange.beg.obj = oPgf;
tRange.beg.offset = 0; // Well, this must be calculated!
tRange.end.obj = oPgf;
tRange.end.offset = Constants.FV_OBJ_END_OFFSET;
oDoc.TextSelection = tRange;
oDoc.Copy (0); // for test
}

