scripttag in Pages

Hi,

I know how to make a scripttag in pages.

But I am looking for the correct syntax to change the placeholder text into the information that I read from a numbers spreadsheet cell.

Hi. And a belated welcome to MacScripter!

I’ve not had cause to use Pages placeholder texts, but fooling around with them this morning, it seems they have to be identified by their tags and then be set themselves to the replacement text. Once a placeholder text has been set to new text, it ceases to exist as a placeholder text, so if the color, font, or size have to be changed too, these have to be done first. Some examples:

tell application "Pages"
	tell document 1
		set first placeholder text whose tag is "Urna Semper" to "Fred Bloggs"
		
		set every placeholder text whose tag contains "Trenz" to "Flooble"
		
		tell (a reference to (first placeholder text whose tag begins with "Lorem"))
			set its color to {65535, 0, 0}
			set its size to 24
			-- 'contents' in the following line belongs to the reference, not to the placeholder text. It means the placeholder text itself.
			set its contents to "Caesar adsum iam forte, Nero adorat."
		end tell
	end tell
end tell