Bounds as string in Quark 6

Hello,

I want to have the bounds of every text box in a string. I tried many ways to do this but none of them works
Here’s the code to look what i’m trying to do


set TheText to "This list conains the bounds of every box in the document" & return & return as string

tell application "QuarkXPress Passport"
	set theDocName to name of document 1
	tell document 1
		
		repeat with theBox from 1 to count the numbers of generic boxes
			set theBounds to bounds of generic box theBox
			set theClass to class of generic box theBox
			if theClass is equal to text box then
				set theClassInString to "Text Box"
			else if theClass is equal to picture box then
				set theClassInString to "Picture Box"
			else if theClass is equal to line box then
				set theClassInString to "Line Box"
			else
				set theClassInString to "Others"
			end if
			set TheText to TheText & (theBounds & tab & tab & theClassInString & return) as string
		end repeat
	end tell
end tell

set theFile to (path to desktop folder) & theDocName as string

try
	open for access file theFile with write permission
	write TheText to file theFile as text
	close access file theFile
on error
	close access file theFile
	display dialog "still not working"
end try

thanks in advance