What kind of tag or mark? How should it look like?
What have you tried?
actually i have to capitalise some selected word in indesign. so i want to add a mark on those words and then apply some programming logic to capitalise them.
Can you just use a character style set to all caps? If you need a first letter cap, set the words to a specific character style (maybe call it Capitalize with no settings added). Then with your script find all instances of the style and apply the capitalization you want to the "found items."
Just a thought.
Take a look to this delicious piece of cake cooking by our friend and master-chief Jongware!
Not stale few years later [ … the code, of course! not Theunis!!]