in first times i took text frame and color text and background. but i need color only first words, and in second times i can not color only selected word. please, help me! thanks.
var textHeaderTf;
try{
textHeaderTf = headerTf.paragraphs.item(0);
if(textHeaderTf!=undefined && textHeaderTf!=null)
{
headerTf.parentStory.insertionPoints.item(-1).contents = 'myNewText';
// textHeaderTf.fillColor = myColorA;
textHeaderTf.strokeColor = myColorB;
}
}catch(e){log.write('setHeader font-color error7'+e);}
try{
textHeaderTfWord = textHeaderTf.words[0];//headerTf.paragraphs.item(1);
if(textHeaderTfWord!=undefined && textHeaderTfWord!=null)
{
textHeaderTfWord.fillColor = myColorA;
textHeaderTfWord.strokeColor = myColorA;
}
}catch(e){log.write('setHeader font-color error8'+e);}