AppleScript with a Pages Table to *Resize rows to fit cell contents*
Hello all, I'm using AppleScript to collect about 500 one-page account statements that are generated individually by a Numbers spreadsheet into a Pages document. It's working great but Pages changes the row height when it pastes. When I manually uncheck the "Resize rows to fit cell contents" box on the Pages - Format - Table pane it fits perfectly, but I can't get it to work via AppleScript.
Here's the code after copying the table from Numbers:
tell application "Pages" to activate
delay 0.5 -- vary as needed to give UI time to catch up
tell application "System Events" to keystroke "v" using {command down}
tell application "Pages"
set t to (front document's last table)
set t's position to {81, 136}
--set t's rowheight to 17 --not available when resizerows is checked
set t's resizerows to false -- unchecked/off
end tell
The last set statement gives error "Pages got an error: Can’t make resizerows of table 1 of document id \"..." into type specifier."
Is this a syntax error, or is this just not possible to do? Thanks for any help!
iMac (M1, 2021)