For example, to set the Text object named myText to all bold use the following syntax:
myText.SetSelection(0,-1);
var newStyle = new Object();
newStyle.bold = true;
myText.SetSelectionStyle(newStyle);
see also: GetSelectionStyle, GetSelectionParagraphStyle and SetSelectionParagraphStyle