Also tried this approach but got the same error:
settheStoriestoobject referenceofstoriesofmyDoc
repeatwiththeStoryintheStories
try
settheParaStylestonameofapplied paragraph styleofobject referenceofparagraphsoftheStory
repeatwithxfrom 1 to (countoftheParaStyles) - 1
ifmyPara = contentsofitemxoftheParaStylesthen
setapplied paragraph styleof (firstparagraphwhose (indexisgreater thanx)) tomychangePara
endif
endrepeat
endtry
endrepeat
endtell