Try this ...
myValue = myVariableName.variableOptions.contents;
Thanks for your reply. Is it possible to get text variable name from each page. I want to Identify which text variable is inserted in specific page.
Thanks & Regards,
I don't think so, the parent of TextVariable is only document or application,
myText.textVariableInstances.everyItem().resultText would do it.
The representation of a TextVariable on the page is a TextVariableInstance. They are "text" objects (parent can be: Cell, Change, Footnote, Note, Story, TextFrame, XmlStory). The "resultText" property is the string the variable instance is currently displaying. See Adobe InDesign CS5 (7.0) Object Model JS: TextVariableInstance
Thanks lot for the solution.