Here's what I am trying to do: Add a page at the end of the document. Then, if there is a master page applied automatically, like "A-Master", to delete it so the page has "[None]" master applied.
I've tried several variations on applying "[None]" or "None" or nothing or null, which do not seem to work.
I also have a script that I thought worked, but it actually COMPLETELY removes the master spread from the entire document. Clearly not what I intended.
Any suggestions on how to do this?
Non-Functional example script:
tell application "Adobe InDesign CS3"
tell document 1
--page 1 has "A-Master" applied
tell page 1 to delete applied master
--"A-Master" is now gone from document
The applied master property is a reference to the master spread in question. Delete it and you indeed delete the master itself (as you've discovered).
What you really want to do is change the applied master property to be "[None]" or null.
myPage.appliedMaster = null;
I'm not sure what the AS syntax is.
omg I feel so dumb some days. Applescript, simultaneously easy and hard.