Hello Gleeson9,
welcome here.
As an example you can change the first word in a textframe to superscript (Extendscript/Javascript):
app.activeDocument.textFrames[0].words[0].characterAttributes.baselinePosition = FontBaselineOption.SUPERSCRIPT;
Hope this is helpful for you
