Scripting InDesign Books (.indb files)

I am trying to import one XML file into several documents of an InDesign “Book”. A Book is a .indb file that “contains” two or more InDesign documents with automatic pagination and other features. When writing appleScripts, I usually employ “get properties” in order to figure out the correct way to address a particular object. So far, I have not been able to get the properties of a book.

The following script returns {“SAMPLEKITS_TG.indb”}, which is the name of my current open book.


tell application "Adobe InDesign CS2"
	set thisBook to name of every book
end tell

But various forms of the script below return the following AppleScript error: “Adobe InDesign CS2 got an error: Invalid parameter.”


tell application "Adobe InDesign CS2"
	set thisBook to name of every book
	get properties of book thisBook
	end tell

According to the InDesign dictionary, there are several properties of a book. I have not been able to probe deeper than the name. Does anyone have experience writing AppleScripts for InDesign Books?

A little help will go a long way.

Hi Tofner

Not done any work with books in indesign but this snippet seemed to work for me to return properties.

tell application "Adobe InDesign CS2"
	activate
	tell book "Book 1.indb" --> Replace with Name of your Book
		get properties
	end tell
end tell

Hope this helps