Change paragraph justification in InDesign Table

I am trying to change the justification on a column in a table to right aligned. That is my final goal, but in the mean time, I have simplified the whole thing for testing and I would be satisfied to change the justification on anything.

The following works:

tell application "InDesign CS" 
	tell active document 
		tell text frame 1 
			tell table 1 
				tell text 1 of every cell 
					set properties to {applied font:"Arial", font style:"Regular", point size:12} 
				end tell 
			end tell 
		end tell 
	end tell 
end tell

So I know I have ahold of something. However, if I try to right align the text:

tell application "InDesign CS" 
	tell active document 
		tell text frame 1 
			tell table 1 
				tell text 1 of every cell 
					set properties to {justification:"right aligned"} 
				end tell 
			end tell 
		end tell 
	end tell 
end tell

I get an error:
“InDesign CS got an error: Can’t set properties of text 1 of every cell of table 1 of text frame 1 of active document to {justification:“right aligned”}.”

I have tried both “right” and “right aligned” If I get the properties within the same tell block, justification is in there.

Any ideas?

Thanks,

T.

try this:

tell application “InDesign CS”
tell active document
tell text frame 1
tell table 1
tell text 1 of every cell
set properties to {justification:“right align”}
end tell
end tell
end tell
end tell
end tell

Steven

Trinkel,

I don’t really work with InDesign that much but through some of my experience with Illustrator and it’s syntax I came up with this. This isn’t exactly the code you were trying with the table and cells but it may help you in your quest.

tell application "InDesign CS"
	activate
	tell active document
		set selection to text frame 1
		set properties of paragraph 1 of text frame 1 to {justification:right align}
	end tell
end tell

You probably don’t have to select the item I just put that in there to see that the correct text was being selected.
Hope this helps some.