Change the version to 5 or 6 and do it there.
Thanks Dave for responding.
If I change the version to 5 or 6 then hundreds of the ID functions/properties in my app will need to be changed taking weeks to find and change them all. This would also prevent many of our users, who are still on CS2 or CS3, from using the app.
Adobe has changed the object model entensively with each successive version of InDesign. I don't know how to support multiple versions without setting the script compatibility to the lowerst common denominator - CS2.
I've not done much of this myself, but I thought you could change the version in mid-script for a short run of code and then change it back.